[scrobbles] Try fixing mopidy within existing framework
This commit is contained in:
@ -854,17 +854,16 @@ class Scrobble(TimeStampedModel):
|
|||||||
)
|
)
|
||||||
return scrobble
|
return scrobble
|
||||||
|
|
||||||
if mopidy_status == "stopped":
|
if scrobble and (
|
||||||
scrobble.stop()
|
scrobble.can_be_updated or mopidy_status == "stopped"
|
||||||
|
):
|
||||||
if scrobble and scrobble.can_be_updated:
|
|
||||||
return scrobble.update(scrobble_data)
|
return scrobble.update(scrobble_data)
|
||||||
|
|
||||||
# Discard status before creating
|
# Discard status before creating
|
||||||
scrobble_data.pop("mopidy_status", None)
|
scrobble_data.pop("mopidy_status", None)
|
||||||
scrobble_data.pop("jellyfin_status", None)
|
scrobble_data.pop("jellyfin_status", None)
|
||||||
logger.info(
|
logger.info(
|
||||||
f"[scrobbling] existing scrobble finished, creating new scrobble",
|
f"[scrobbling] creating new scrobble",
|
||||||
extra={
|
extra={
|
||||||
"scrobble_id": scrobble.id if scrobble else None,
|
"scrobble_id": scrobble.id if scrobble else None,
|
||||||
"media_type": mtype,
|
"media_type": mtype,
|
||||||
|
|||||||
Reference in New Issue
Block a user