Adds Lyrics Support to Subsonic API (#1379)
* Add function 'isSynced' that identifies if lyrics are synced or not and add tests for the same * implement 'getLyrics' which returns lyrics if they exist Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com> * remove timestamps frorom the the lyrics if they are synced, fix filters & clean up code Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com> * add snapshot tests for the 'Lyrics' response & add some clean up Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com> * add tests for 'GetLyrics' function Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com> * update the snapshot test & the test for 'GetLyrics' function Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
This commit is contained in:
@@ -111,3 +111,11 @@ func SongsByRandom(genre string, fromYear, toYear int) Options {
|
||||
func Starred() Options {
|
||||
return Options{Sort: "starred_at", Order: "desc", Filters: squirrel.Eq{"starred": true}}
|
||||
}
|
||||
|
||||
func SongsWithLyrics(artist, title string) Options {
|
||||
return Options{
|
||||
Sort: "updated_at",
|
||||
Order: "desc",
|
||||
Filters: squirrel.And{squirrel.Eq{"artist": artist, "title": title}, squirrel.NotEq{"lyrics": ""}},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user