Refactor loadGenres, remove duplication

This commit is contained in:
Deluan 2024-04-28 14:31:15 -04:00
parent de90152a71
commit 31fcab07d2
7 changed files with 68 additions and 82 deletions

View file

@ -104,7 +104,7 @@ func (r sqlRepository) GetBookmarks() (model.Bookmarks, error) {
log.Error(r.ctx, "Error getting mediafiles with bookmarks", "user", user.UserName, err)
return nil, err
}
err = r.loadMediaFileGenres(&mfs)
err = loadAllGenres(r, mfs)
if err != nil {
log.Error(r.ctx, "Error loading genres for bookmarked songs", "user", user.UserName, err)
return nil, err