[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:
WithoutPants
2022-09-02 11:18:37 +10:00
parent 273cf0383d
commit 94d39da706
23 changed files with 93 additions and 26 deletions

View File

@@ -97,7 +97,7 @@ func (h *ScanHandler) associateExisting(ctx context.Context, existing []*models.
}
if !found {
logger.Infof("Adding %s to gallery %s", f.Base().Path, i.GetTitle())
logger.Infof("Adding %s to gallery %s", f.Base().Path, i.DisplayName())
if err := h.CreatorUpdater.AddFileID(ctx, i.ID, f.Base().ID); err != nil {
return fmt.Errorf("adding file to gallery: %w", err)