Skip to content

Commit

Permalink
spelling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Feb 8, 2021
1 parent f33a95d commit a6dac05
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/Movies.yml.template
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ collections:
sync_mode: sync

######################################################
# TMDB Collections #
# TMDb Collections #
######################################################
101 Dalmatians:
tmdb_collection_details: 100693
Expand Down
2 changes: 1 addition & 1 deletion modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ def check_map(input_ids):
try:
title = str(self.TMDb.get_movie(missing_id).title)
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:
logger.error(e)
logger.info("{} Movie{} Missing".format(len(missing_movies), "s" if len(missing_movies) > 1 else ""))
Expand Down
4 changes: 2 additions & 2 deletions modules/radarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ def add_tmdb(self, tmdb_ids):
try:
year = movie.release_date.split("-")[0]
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

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

poster = "https://image.tmdb.org/t/p/original{}".format(movie.poster_path)
Expand Down
4 changes: 2 additions & 2 deletions modules/tmdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ def __init__(self, params):
@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):
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)
def convert_to_tmdb(self, external_id, external_source, is_movie):
search_results = self.Movie.external(external_id=external_id, external_source=external_source)
search = search_results["movie_results" if is_movie else "tv_results"]
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_imdb_to_tmdb(self, imdb_id, is_movie=True): return self.convert_to_tmdb(imdb_id, "imdb_id", is_movie)
Expand Down

0 comments on commit a6dac05

Please sign in to comment.