mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
[Files Refactor] Bug fixes (#2868)
* Return error if multiple rows returned for id * Add missing LoadFiles calls * Show id if path is empty
This commit is contained in:
@@ -31,7 +31,7 @@ func getGalleryFileTagger(s *models.Gallery, cache *match.Cache) tagger {
|
||||
return tagger{
|
||||
ID: s.ID,
|
||||
Type: "gallery",
|
||||
Name: s.GetTitle(),
|
||||
Name: s.DisplayName(),
|
||||
Path: path,
|
||||
trimExt: trimExt,
|
||||
cache: cache,
|
||||
|
||||
@@ -23,7 +23,7 @@ func getImageFileTagger(s *models.Image, cache *match.Cache) tagger {
|
||||
return tagger{
|
||||
ID: s.ID,
|
||||
Type: "image",
|
||||
Name: s.GetTitle(),
|
||||
Name: s.DisplayName(),
|
||||
Path: s.Path,
|
||||
cache: cache,
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func getSceneFileTagger(s *models.Scene, cache *match.Cache) tagger {
|
||||
return tagger{
|
||||
ID: s.ID,
|
||||
Type: "scene",
|
||||
Name: s.GetTitle(),
|
||||
Name: s.DisplayName(),
|
||||
Path: s.Path,
|
||||
cache: cache,
|
||||
}
|
||||
|
||||
@@ -121,11 +121,11 @@ func (t *tagger) tagScenes(ctx context.Context, paths []string, sceneReader scen
|
||||
added, err := addFunc(p)
|
||||
|
||||
if err != nil {
|
||||
return t.addError("scene", p.GetTitle(), err)
|
||||
return t.addError("scene", p.DisplayName(), err)
|
||||
}
|
||||
|
||||
if added {
|
||||
t.addLog("scene", p.GetTitle())
|
||||
t.addLog("scene", p.DisplayName())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,11 +142,11 @@ func (t *tagger) tagImages(ctx context.Context, paths []string, imageReader imag
|
||||
added, err := addFunc(p)
|
||||
|
||||
if err != nil {
|
||||
return t.addError("image", p.GetTitle(), err)
|
||||
return t.addError("image", p.DisplayName(), err)
|
||||
}
|
||||
|
||||
if added {
|
||||
t.addLog("image", p.GetTitle())
|
||||
t.addLog("image", p.DisplayName())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,11 +163,11 @@ func (t *tagger) tagGalleries(ctx context.Context, paths []string, galleryReader
|
||||
added, err := addFunc(p)
|
||||
|
||||
if err != nil {
|
||||
return t.addError("gallery", p.GetTitle(), err)
|
||||
return t.addError("gallery", p.DisplayName(), err)
|
||||
}
|
||||
|
||||
if added {
|
||||
t.addLog("gallery", p.GetTitle())
|
||||
t.addLog("gallery", p.DisplayName())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user