Handle photo not found case in API routes (#1201)

* Handle media not found issue

* temporary run workflows for master pushes only; tests

* revert temp workflow changes

---------

Co-authored-by: Konstantin Koval
This commit is contained in:
Kostiantyn
2025-05-10 17:45:32 +03:00
committed by GitHub
parent 36f3924b4f
commit 27a0b082d1
3 changed files with 130 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ import (
"gorm.io/gorm"
)
var ProcessSingleMediaFunc = ProcessSingleMedia
func ScanMedia(tx *gorm.DB, mediaPath string, albumId int, cache *scanner_cache.AlbumScannerCache) (*models.Media, bool, error) {
mediaName := path.Base(mediaPath)