浏览代码

[music] Fixes missing jellyfin ts converter

Colin Powell 1 月之前
父节点
当前提交
27f50baf5d
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      vrobbler/apps/scrobbles/scrobblers.py

+ 4 - 1
vrobbler/apps/scrobbles/scrobblers.py

@@ -22,6 +22,7 @@ from scrobbles.constants import (
     SCROBBLE_CONTENT_URLS,
     SCROBBLE_CONTENT_URLS,
 )
 )
 from scrobbles.models import Scrobble
 from scrobbles.models import Scrobble
+from scrobbles.utils import convert_to_seconds
 from sports.models import SportEvent
 from sports.models import SportEvent
 from sports.thesportsdb import lookup_event_from_thesportsdb
 from sports.thesportsdb import lookup_event_from_thesportsdb
 from tasks.models import Task
 from tasks.models import Task
@@ -117,7 +118,9 @@ def jellyfin_scrobble_media(
             title=post_data.get("Name", ""),
             title=post_data.get("Name", ""),
             artist_name=post_data.get("Artist", ""),
             artist_name=post_data.get("Artist", ""),
             album_name=post_data.get("Album", ""),
             album_name=post_data.get("Album", ""),
-            run_time_seconds=post_data.get("RunTime", 900000),
+            run_time_seconds=convert_to_seconds(
+                post_data.get("RunTime", 900000)
+            ),
             musicbrainz_id=post_data.get("Provider_musicbrainztrack", ""),
             musicbrainz_id=post_data.get("Provider_musicbrainztrack", ""),
         )
         )
         # A hack because we don't worry about updating music ... we either finish it or we don't
         # A hack because we don't worry about updating music ... we either finish it or we don't