Browse Source

Try ignoring jellyfin video progress

Colin Powell 2 năm trước cách đây
mục cha
commit
40fc4d21d3
2 tập tin đã thay đổi với 3 bổ sung12 xóa
  1. 1 8
      vrobbler/apps/scrobbles/models.py
  2. 2 4
      vrobbler/apps/scrobbles/views.py

+ 1 - 8
vrobbler/apps/scrobbles/models.py

@@ -681,14 +681,7 @@ class Scrobble(TimeStampedModel):
             .order_by("-modified")
             .first()
         )
-        # We want to finish a video after it's reeached 90%
-        # but we also don't want to create new videos, so in
-        # this special case, we allow jellyfin resumed status
-        # to allow a scrobble to be updated.
-        jellyfin_in_progress = scrobble_data.get("jellyfin_status", None)
-        if scrobble and (
-            scrobble.can_be_updated or jellyfin_in_progress == "resumed"
-        ):
+        if scrobble and scrobble.can_be_updated:
             source = scrobble_data["source"]
             mtype = media.__class__.__name__
             logger.info(

+ 2 - 4
vrobbler/apps/scrobbles/views.py

@@ -303,10 +303,8 @@ def lastfm_import(request):
 def jellyfin_webhook(request):
     data_dict = request.data
 
-    if (
-        data_dict["NotificationType"] == "PlaybackProgress"
-        and data_dict["ItemType"] == "Audio"
-    ):
+    # Disregard progress updates
+    if data_dict["NotificationType"] == "PlaybackProgress":
         return Response({}, status=status.HTTP_304_NOT_MODIFIED)
 
     # For making things easier to build new input processors