[scrobbling] Enrich some more logs
This commit is contained in:
@ -100,8 +100,10 @@ def check_scrobble_for_finish(
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
is_complete = False
|
||||||
if scrobble.percent_played >= completion_percent or force_finish:
|
if scrobble.percent_played >= completion_percent or force_finish:
|
||||||
logger.info(f"{scrobble.id} finished at {scrobble.percent_played}")
|
is_complete = True
|
||||||
|
# A hack to fix overruns on time ... default to media taking as long as needed to finish
|
||||||
scrobble.playback_position_seconds = (
|
scrobble.playback_position_seconds = (
|
||||||
scrobble.media_obj.run_time_seconds
|
scrobble.media_obj.run_time_seconds
|
||||||
)
|
)
|
||||||
@ -118,14 +120,16 @@ def check_scrobble_for_finish(
|
|||||||
"playback_position_seconds",
|
"playback_position_seconds",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
logger.info(
|
||||||
logger.info(
|
f"[scrobbling] checked for completion",
|
||||||
f"[scrobbling] not complete",
|
extra={
|
||||||
extra={
|
"scrobble_id": scrobble.id,
|
||||||
"scrobble_id": scrobble.id,
|
"percent_played": scrobble.percent_played,
|
||||||
"percent_played": scrobble.percent_played,
|
"completion_percent": completion_percent,
|
||||||
},
|
"is_complete": is_complete,
|
||||||
)
|
"force_finish": force_finish,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_scrobbles_for_media(media_obj, user: User) -> models.QuerySet:
|
def get_scrobbles_for_media(media_obj, user: User) -> models.QuerySet:
|
||||||
|
|||||||
Reference in New Issue
Block a user