Jelajahi Sumber

[webpages] Clean up messy inheritence issues

Colin Powell 3 minggu lalu
induk
melakukan
cc99edc112
1 mengubah file dengan 2 tambahan dan 14 penghapusan
  1. 2 14
      vrobbler/apps/webpages/models.py

+ 2 - 14
vrobbler/apps/webpages/models.py

@@ -107,20 +107,8 @@ class WebPage(ScrobblableItem):
         # TODO Figure out how to add a preview?
         return ""
 
-    def scrobble_for_user(self, user_id):
-        Scrobble = apps.get_model("scrobbles", "Scrobble")
-        scrobble_data = self.basic_scrobble_data(user_id)
-        logger.info(
-            "[scrobble_for_user] called for webpage",
-            extra={
-                "webpage_id": self.id,
-                "user_id": user_id,
-                "scrobble_data": scrobble_data,
-                "media_type": MediaType.WEBPAGE,
-            },
-        )
-        scrobble = Scrobble.create_or_update(self, user_id, scrobble_data)
-        # TODO Possibly make this async?
+    def scrobble_for_user(self, user_id, *args, **kwargs):
+        scrobble = super().scrobble_for_user(user_id)
         scrobble.push_to_archivebox()
         return scrobble