fix: check if album is starred before adding the starred date in the response. also return "starred" in search responses

This commit is contained in:
Deluan
2020-02-24 22:06:12 -05:00
parent e032bfcf6b
commit 33ede13eef
5 changed files with 16 additions and 7 deletions
+4 -1
View File
@@ -165,10 +165,13 @@ func (b *browser) buildAlbumDir(al *model.Album, tracks model.MediaFiles) *Direc
Genre: al.Genre,
CoverArt: al.CoverArtId,
PlayCount: int32(al.PlayCount),
Starred: al.StarredAt,
UserRating: al.Rating,
}
if al.Starred {
dir.Starred = al.StarredAt
}
dir.Entries = FromMediaFiles(tracks)
return dir
}