Skip to content

Commit

Permalink
Merge pull request #1739 from glensc/yt
Browse files Browse the repository at this point in the history
Fix: Fix fatal errors with youtube provider
  • Loading branch information
glensc authored Jan 15, 2024
2 parents dd31d4d + e64e5d9 commit 0b954d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plextraktsync/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,16 @@ def resolve_any(self, pm: PlexLibraryItem, show: Media = None) -> Media | None:
return None

def resolve_guid(self, guid: PlexGuid, show: Media = None):
if guid.provider in ["youtube"]:
logger.debug(f"{guid.title_link}: Skipping {guid} because unsupported provider '{guid.provider}'", extra={"markup": True})
return None

if guid.provider in ["local", "none", "agents.none"]:
logger.warning(f"{guid.title_link}: Skipping {guid} because provider {guid.provider} has no external Id", extra={"markup": True})

return None

if guid.provider not in ["imdb", "tmdb", "tvdb"]:
logger.error(f"{guid.title_link}: Unable to parse a valid provider from {guid}", extra={"markup": True})
logger.error(f"{guid.title_link}: '{guid.provider}' is not valid provider from {guid}", extra={"markup": True})
return None

try:
Expand Down

0 comments on commit 0b954d8

Please sign in to comment.