mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
* implement topSongsByArtistId extension * do not look up by artist name if empty --------- Co-authored-by: Deluan Quintão <deluan@navidrome.org>
28 lines
867 B
Go
28 lines
867 B
Go
package subsonic
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/navidrome/navidrome/server/subsonic/responses"
|
|
)
|
|
|
|
func (api *Router) GetOpenSubsonicExtensions(_ *http.Request) (*responses.Subsonic, error) {
|
|
response := newResponse()
|
|
extensions := responses.OpenSubsonicExtensions{
|
|
{Name: "transcodeOffset", Versions: []int32{1}},
|
|
{Name: "formPost", Versions: []int32{1}},
|
|
{Name: "songLyrics", Versions: []int32{1, 2}},
|
|
{Name: "indexBasedQueue", Versions: []int32{1}},
|
|
{Name: "transcoding", Versions: []int32{1}},
|
|
{Name: "playbackReport", Versions: []int32{1}},
|
|
{Name: "topSongsByArtistId", Versions: []int32{1}},
|
|
}
|
|
if api.sonic != nil && api.sonic.HasProvider() {
|
|
extensions = append(extensions, responses.OpenSubsonicExtension{
|
|
Name: "sonicSimilarity", Versions: []int32{1},
|
|
})
|
|
}
|
|
response.OpenSubsonicExtensions = &extensions
|
|
return response, nil
|
|
}
|