[scrobbling] Futher clean up logging for locations
This commit is contained in:
@ -947,11 +947,11 @@ class Scrobble(TimeStampedModel):
|
|||||||
|
|
||||||
scrobble.stop(force_finish=True)
|
scrobble.stop(force_finish=True)
|
||||||
logger.info(
|
logger.info(
|
||||||
f"[scrobbling] finish location scrobble, we've moved",
|
f"[scrobbling] finish location scrobble, moved from old location",
|
||||||
extra={
|
extra={
|
||||||
"scrobble_id": scrobble.id,
|
"scrobble_id": scrobble.id,
|
||||||
"media_type": cls.MediaType.GEO_LOCATION,
|
"media_type": cls.MediaType.GEO_LOCATION,
|
||||||
"location_id": location.id,
|
"media_id": location.id,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -960,22 +960,24 @@ class Scrobble(TimeStampedModel):
|
|||||||
logger.info(
|
logger.info(
|
||||||
f"[scrobbling] has moved but found existing named location, using it",
|
f"[scrobbling] has moved but found existing named location, using it",
|
||||||
extra={
|
extra={
|
||||||
"location_id": location.id,
|
"media_id": location.id,
|
||||||
"media_type": cls.MediaType.GEO_LOCATION,
|
"media_type": cls.MediaType.GEO_LOCATION,
|
||||||
"existing_location_id": existing_location.id,
|
"existing_location_id": existing_location.id,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
scrobble_data["geo_location"] = existing_location
|
scrobble_data["geo_location"] = existing_location
|
||||||
|
|
||||||
|
scrobble = cls.create(scrobble_data)
|
||||||
logger.info(
|
logger.info(
|
||||||
f"[scrobbling] creating for location from GPSLogger",
|
f"[scrobbling] created for location from GPSLogger",
|
||||||
extra={
|
extra={
|
||||||
"location_id": location.id,
|
"scrobble_id": scrobble.id,
|
||||||
|
"media_id": location.id,
|
||||||
"scrobble_data": scrobble_data,
|
"scrobble_data": scrobble_data,
|
||||||
"media_type": cls.MediaType.GEO_LOCATION,
|
"media_type": cls.MediaType.GEO_LOCATION,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
return cls.create(scrobble_data)
|
return scrobble
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def past_scrobbled_locations(
|
def past_scrobbled_locations(
|
||||||
|
|||||||
Reference in New Issue
Block a user