spelling fix

pull/16/head v1.0.0
meisnate12 4 years ago
parent f33a95de2b
commit a6dac0563b

@ -1159,7 +1159,7 @@ collections:
sync_mode: sync sync_mode: sync
###################################################### ######################################################
# TMDB Collections # # TMDb Collections #
###################################################### ######################################################
101 Dalmatians: 101 Dalmatians:
tmdb_collection_details: 100693 tmdb_collection_details: 100693

@ -935,7 +935,7 @@ class Config:
try: try:
title = str(self.TMDb.get_movie(missing_id).title) title = str(self.TMDb.get_movie(missing_id).title)
missing_movies_with_names.append((title, missing_id)) missing_movies_with_names.append((title, missing_id))
logger.info("{} Collection | ? | {} (TMDB: {})".format(collection_name, title, missing_id)) logger.info("{} Collection | ? | {} (TMDb: {})".format(collection_name, title, missing_id))
except Failed as e: except Failed as e:
logger.error(e) logger.error(e)
logger.info("{} Movie{} Missing".format(len(missing_movies), "s" if len(missing_movies) > 1 else "")) logger.info("{} Movie{} Missing".format(len(missing_movies), "s" if len(missing_movies) > 1 else ""))

@ -52,11 +52,11 @@ class RadarrAPI:
try: try:
year = movie.release_date.split("-")[0] year = movie.release_date.split("-")[0]
except AttributeError: except AttributeError:
logger.error("TMDB Error: No year for ({}) {}".format(tmdb_id, movie.title)) logger.error("TMDb Error: No year for ({}) {}".format(tmdb_id, movie.title))
continue continue
if year.isdigit() is False: if year.isdigit() is False:
logger.error("TMDB Error: No release date yet for ({}) {}".format(tmdb_id, movie.title)) logger.error("TMDb Error: No release date yet for ({}) {}".format(tmdb_id, movie.title))
continue continue
poster = "https://image.tmdb.org/t/p/original{}".format(movie.poster_path) poster = "https://image.tmdb.org/t/p/original{}".format(movie.poster_path)

@ -31,7 +31,7 @@ class TMDbAPI:
@retry(stop_max_attempt_number=6, wait_fixed=10000, retry_on_exception=util.retry_if_not_failed) @retry(stop_max_attempt_number=6, wait_fixed=10000, retry_on_exception=util.retry_if_not_failed)
def convert_from_tmdb(self, tmdb_id, convert_to, is_movie): def convert_from_tmdb(self, tmdb_id, convert_to, is_movie):
try: return self.Movie.external_ids(tmdb_id)[convert_to] if is_movie else self.TV.external_ids(tmdb_id)[convert_to] try: return self.Movie.external_ids(tmdb_id)[convert_to] if is_movie else self.TV.external_ids(tmdb_id)[convert_to]
except TMDbException: raise Failed("TMDB Error: No {} found for TMDb ID {}".format(convert_to.upper().replace("B_", "b "), tmdb_id)) except TMDbException: raise Failed("TMDb Error: No {} found for TMDb ID {}".format(convert_to.upper().replace("B_", "b "), tmdb_id))
@retry(stop_max_attempt_number=6, wait_fixed=10000, retry_on_exception=util.retry_if_not_failed) @retry(stop_max_attempt_number=6, wait_fixed=10000, retry_on_exception=util.retry_if_not_failed)
@ -39,7 +39,7 @@ class TMDbAPI:
search_results = self.Movie.external(external_id=external_id, external_source=external_source) search_results = self.Movie.external(external_id=external_id, external_source=external_source)
search = search_results["movie_results" if is_movie else "tv_results"] search = search_results["movie_results" if is_movie else "tv_results"]
if len(search) == 1: return search[0]["id"] if len(search) == 1: return search[0]["id"]
else: raise Failed("TMDB Error: No TMDb ID found for {} {}".format(external_source.upper().replace("B_", "b "), external_id)) else: raise Failed("TMDb Error: No TMDb ID found for {} {}".format(external_source.upper().replace("B_", "b "), external_id))
def convert_tmdb_to_imdb(self, tmdb_id, is_movie=True): return self.convert_from_tmdb(tmdb_id, "imdb_id", is_movie) def convert_tmdb_to_imdb(self, tmdb_id, is_movie=True): return self.convert_from_tmdb(tmdb_id, "imdb_id", is_movie)
def convert_imdb_to_tmdb(self, imdb_id, is_movie=True): return self.convert_to_tmdb(imdb_id, "imdb_id", is_movie) def convert_imdb_to_tmdb(self, imdb_id, is_movie=True): return self.convert_to_tmdb(imdb_id, "imdb_id", is_movie)

Loading…
Cancel
Save