Fix #387: pass offset to subsonic random album fetch call

This commit is contained in:
Drew Weymouth
2024-05-20 18:17:41 -07:00
parent fd340ec97e
commit ce647c27b9
2 changed files with 10 additions and 4 deletions
@@ -225,7 +225,11 @@ func (s *subsonicMediaProvider) newRandomIter(filter mediaprovider.AlbumFilter,
return helpers.NewRandomAlbumIter(
s.fetchFnFromStandardSort("newest"),
makeFetchFn(func(offset, limit int) ([]*subsonic.AlbumID3, error) {
return s.client.GetAlbumList2("random", map[string]string{"size": strconv.Itoa(limit)})
args := map[string]string{
"size": strconv.Itoa(limit),
"offset": strconv.Itoa(offset),
}
return s.client.GetAlbumList2("random", args)
}),
filter, s.prefetchCoverCB)
}