Subsonic: Better scrobbling and track enumeration (#1035)
authorEric Munson <eric@munsonfam.org>
Sat, 27 Jan 2024 17:41:51 +0000 (12:41 -0500)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 17:41:51 +0000 (18:41 +0100)
commit985e4e286d82f986e527897a9bb9bfba2a79288d
tree698066202f8977820290c988325e9836e2a8a8d6
parentf66071e49ecd1b23f6efffb927859cad00b6f45d
Subsonic: Better scrobbling and track enumeration (#1035)

* Subsonic: Fix stream scrobbling

get_audio_stream can be called multiple times when a track is played to
allow for MA to analyze the audio. Scrobbling at the end of the stream
was causing multiple reports when placed here. The correct way to do is
is using a callback on the StreamDetails object we create. Now we
scrobble playback when MA tells us that more than half the track has
been played.

We also now make a "Now Playing" scrobble when the StreamDetails object
is built.

Signed-off-by: Eric B Munson <eric@munsonfam.org>
* Subsonic: Better song enumeration

Rely on pagination instead of one massive request.

Signed-off-by: Eric B Munson <eric@munsonfam.org>
---------

Signed-off-by: Eric B Munson <eric@munsonfam.org>
music_assistant/server/providers/opensubsonic/sonic_provider.py