feat(scrobble): submit final scrobble on playback finish with listen threshold

This commit is contained in:
joelilas
2026-01-26 19:25:33 +01:00
parent c1952b0002
commit 5ed89f3fc5
2 changed files with 35 additions and 1 deletions

View File

@@ -586,7 +586,9 @@ async def scrobble(song_id: str, *, submission: bool=True, timestamp: int=None)
"submission": "true" if submission else "false",
}
if timestamp is not None:
scrobble_params["time"] = str(timestamp)
# Subsonic expects epoch time in milliseconds
time_ms = int(timestamp) * 1000
scrobble_params["time"] = str(time_ms)
params = SUBSONIC_REQUEST_PARAMS | scrobble_params