소스 검색

[scrobbling] End around for locations

Colin Powell 1 년 전
부모
커밋
651fc7a745
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      vrobbler/apps/scrobbles/models.py
  2. 5 1
      vrobbler/apps/scrobbles/scrobblers.py

+ 3 - 0
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
             )

+ 5 - 1
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')]}"