Catch separately wrong id_type
There's no point validation this manually, as the check is first
thing in the search_by_id method
MODIFY
plex_trakt_sync/trakt_api.py
plex_trakt_sync/trakt_api.py
@@ -94,7 +94,11 @@ def ratings(self):
@memoize
def find_movie(self, movie):
+ try:
search = trakt.sync.search_by_id(movie.id, id_type=movie.provider)
+ except ValueError as e:
+ # ValueError: search_type must be one of ('trakt', 'trakt-movie', 'trakt-show', 'trakt-episode', 'trakt-person', 'imdb', 'tmdb', 'tvdb')
+ raise e
# look for the first movie in the results
for m in search:
if type(m) is trakt.movies.Movie:

Catch separately wrong id_type

There's no point validation this manually, as the check is first
thing in the search_by_id method