Remove unnecessary repositories methods

This commit is contained in:
Deluan
2021-07-16 17:39:00 -04:00
committed by Deluan Quintão
parent 5e54925520
commit 1d8607ef6a
9 changed files with 23 additions and 64 deletions
+14
View File
@@ -48,6 +48,13 @@ func AlbumsByGenre(genre string) Options {
}
}
func AlbumsByArtistID(artistId string) Options {
return Options{
Sort: "max_year",
Filters: squirrel.Eq{"album_artist_id": artistId},
}
}
func AlbumsByYear(fromYear, toYear int) Options {
sortOption := "max_year, name"
if fromYear > toYear {
@@ -76,6 +83,13 @@ func SongsByGenre(genre string) Options {
}
}
func SongsByAlbum(albumId string) Options {
return Options{
Filters: squirrel.Eq{"album_id": albumId},
Sort: "album",
}
}
func SongsByRandom(genre string, fromYear, toYear int) Options {
options := Options{
Sort: "random()",