ctrlsubsonic: add byGenre to ServeGetAlbumListTwo
This commit is contained in:
@@ -115,6 +115,8 @@ func (c *Controller) ServeGetAlbumListTwo(r *http.Request) *spec.Response {
|
||||
params.GetIntOr("fromYear", 1800),
|
||||
params.GetIntOr("toYear", 2200))
|
||||
q = q.Order("tag_year")
|
||||
case "byGenre":
|
||||
q = q.Joins("JOIN genres ON albums.tag_genre_id=genres.id AND genres.name=?", params.GetOr("genre", "Unknown Genre"))
|
||||
case "frequent":
|
||||
user := r.Context().Value(CtxUser).(*db.User)
|
||||
q = q.Joins("JOIN plays ON albums.id=plays.album_id AND plays.user_id=?",
|
||||
|
||||
Reference in New Issue
Block a user