From 651fc7a745c77d5cb522c2f902d35c26d43e2059 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Tue, 12 Mar 2024 12:41:00 -0400 Subject: [PATCH] [scrobbling] End around for locations --- vrobbler/apps/scrobbles/models.py | 3 +++ vrobbler/apps/scrobbles/scrobblers.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py index b418a4a..7376cac 100644 --- a/vrobbler/apps/scrobbles/models.py +++ b/vrobbler/apps/scrobbles/models.py @@ -840,6 +840,9 @@ class Scrobble(TimeStampedModel): # GeoLocations are a special case scrobble if mtype == cls.MediaType.GEO_LOCATION: + logger.warn( + f"[scrobbling] use create_or_update_location for GeoLocations" + ) scrobble = cls.create_or_update_location( media, scrobble_data, user_id ) diff --git a/vrobbler/apps/scrobbles/scrobblers.py b/vrobbler/apps/scrobbles/scrobblers.py index 2a9ecec..770c932 100644 --- a/vrobbler/apps/scrobbles/scrobblers.py +++ b/vrobbler/apps/scrobbles/scrobblers.py @@ -353,7 +353,11 @@ def gpslogger_scrobble_location(data_dict: dict, user_id: int) -> Scrobble: "source": "GPSLogger", } - scrobble = Scrobble.create_or_update(location, user_id, extra_data) + scrobble = Scrobble.create_or_update_location( + location, + extra_data, + user_id, + ) provider = f"data source: {LOCATION_PROVIDERS[data_dict.get('prov')]}"