Ver código fonte

[scrobbles] Fix scrobbling from IMDB urls

Colin Powell 9 meses atrás
pai
commit
bbe8149e6c

+ 1 - 1
vrobbler/apps/scrobbles/constants.py

@@ -23,7 +23,7 @@ MEDIA_END_PADDING_SECONDS = {
 }
 
 SCROBBLE_CONTENT_URLS = {
-    "-v": "https://www.imdb.com/title/",
+    "-i": "https://www.imdb.com/title/",
     "-s": "https://www.thesportsdb.com/event/",
     "-g": "https://boardgamegeek.com/boardgame/",
     "-b": "https://www.amazon.com/",

+ 3 - 0
vrobbler/apps/scrobbles/scrobblers.py

@@ -142,6 +142,9 @@ def jellyfin_scrobble_media(
 
 
 def manual_scrobble_video(imdb_id: str, user_id: int):
+    if "tt" not in imdb_id:
+        imdb_id = "tt" + imdb_id
+
     video = Video.find_or_create({JELLYFIN_POST_KEYS.get("IMDB_ID"): imdb_id})
 
     # When manually scrobbling, try finding a source from the series