Cleanup JSONDecodeError which is no longer thrown
MODIFY
plex_trakt_sync/trakt_api.py
plex_trakt_sync/trakt_api.py
-from json import JSONDecodeError
from typing import Union
import trakt
@@ -204,8 +203,6 @@ def lookup(self, tm: TVShow):
def find_by_media(self, media: PlexLibraryItem):
try:
search = trakt.sync.search_by_id(media.id, id_type=media.provider, media_type=media.type)
- except JSONDecodeError as e:
- raise ValueError(f"Unable parse search result for {media.provider}/{media.id}: {e.doc!r}") from e
except ValueError as e:
# Search_type must be one of ('trakt', ..., 'imdb', 'tmdb', 'tvdb')
raise ValueError(f"Invalid id_type: '{media.provider}', guid: '{media.guid}', guids: '{media.item.guids}': {e}") from e

Cleanup JSONDecodeError which is no longer thrown