Add multiple genres to MediaFile

This commit is contained in:
Deluan
2021-07-16 11:03:28 -04:00
committed by Deluan Quintão
parent 7cd3a8ba67
commit 39da741a80
21 changed files with 309 additions and 72 deletions
+3 -3
View File
@@ -71,8 +71,8 @@ func AlbumsByYear(fromYear, toYear int) Options {
func SongsByGenre(genre string) Options {
return Options{
Sort: "genre asc, title asc",
Filters: squirrel.Eq{"genre": genre},
Sort: "genre.name asc, title asc",
Filters: squirrel.Eq{"genre.name": genre},
}
}
@@ -82,7 +82,7 @@ func SongsByRandom(genre string, fromYear, toYear int) Options {
}
ff := squirrel.And{}
if genre != "" {
ff = append(ff, squirrel.Eq{"genre": genre})
ff = append(ff, squirrel.Eq{"genre.name": genre})
}
if fromYear != 0 {
ff = append(ff, squirrel.GtOrEq{"year": fromYear})