implement library browsing for Subsonic

This commit is contained in:
Drew Weymouth
2025-07-12 12:43:55 -07:00
parent 9c56429ed4
commit d701375d35
9 changed files with 99 additions and 22 deletions
@@ -8,11 +8,12 @@ import (
)
type searchIterBase struct {
query string
artistOffset int
albumOffset int
songOffset int
s *subsonic.Client
musicFolderId string
query string
artistOffset int
albumOffset int
songOffset int
s *subsonic.Client
}
func (s *searchIterBase) fetchResults() *subsonic.SearchResult3 {
@@ -21,6 +22,9 @@ func (s *searchIterBase) fetchResults() *subsonic.SearchResult3 {
"albumOffset": strconv.Itoa(s.albumOffset),
"songOffset": strconv.Itoa(s.songOffset),
}
if s.musicFolderId != "" {
searchOpts["musicFolderId"] = s.musicFolderId
}
results, err := s.s.Search3(s.query, searchOpts)
if err != nil {
log.Println(err)