[scrobbles] Fix scrobbling apocalypse

This commit is contained in:
2024-04-22 14:19:32 -04:00
parent c28f93a1bb
commit f168608cee

View File

@ -889,8 +889,8 @@ class Scrobble(TimeStampedModel):
}, },
) )
scrobble_data["playback_status"] = scrobble_data.get( scrobble_data["playback_status"] = scrobble_data.pop(
"mopidy_status", scrobble_data.get("jellyfin_status", None) "mopidy_status", scrobble_data.pop("jellyfin_status", None)
) )
# If it's marked as stopped, send it through our update mechanism, which will complete it # If it's marked as stopped, send it through our update mechanism, which will complete it
if scrobble and ( if scrobble and (
@ -900,6 +900,7 @@ class Scrobble(TimeStampedModel):
return scrobble.update(scrobble_data) return scrobble.update(scrobble_data)
# Discard status before creating # Discard status before creating
scrobble_data.pop("playback_status")
logger.info( logger.info(
f"[scrobbling] creating new scrobble", f"[scrobbling] creating new scrobble",
extra={ extra={