From 32ca6ae768d6c3b0d5cb8233e19557cc0876a7e6 Mon Sep 17 00:00:00 2001 From: Rato Date: Tue, 15 Nov 2016 19:55:26 +0100 Subject: [PATCH] Fixing unresolved references (#1550) --- medusa/name_parser/parser.py | 6 +++--- medusa/post_processor.py | 2 -- medusa/server/api/v1/core.py | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/medusa/name_parser/parser.py b/medusa/name_parser/parser.py index 99ad14618e..bf8e4285d6 100644 --- a/medusa/name_parser/parser.py +++ b/medusa/name_parser/parser.py @@ -109,12 +109,12 @@ def _parse_string(self, name): season_number = int(tv_episode['seasonnumber']) episode_numbers = [int(tv_episode['episodenumber'])] logger.debug('Indexer info for show {name}: {ep}', - name=result.show.name, ep=episode_num(season_number, episode_numbers)) - except app.indexer_episodenotfound: + name=result.show.name, ep=episode_num(season_number, episode_numbers[0])) + except app.IndexerEpisodeNotFound: logger.warn("Unable to find episode with date {date} for show '{name}'. Skipping", date=result.air_date, name=result.show.name) episode_numbers = [] - except app.indexer_error as e: + except app.IndexerError as e: logger.warn('Unable to contact {indexer_api.name}: {ex!r}', indexer_api=indexer_api, ex=e) episode_numbers = [] diff --git a/medusa/post_processor.py b/medusa/post_processor.py index e96a10c109..170498abbd 100644 --- a/medusa/post_processor.py +++ b/medusa/post_processor.py @@ -102,8 +102,6 @@ def _log(self, message, level=logger.INFO): def _get_rel_path(self): """Return the relative path to the file if possible, else the parent dir. - :param file_path: path to the file - :type file_path: text_type :return: relative path to file or parent dir to file :rtype: text_type """ diff --git a/medusa/server/api/v1/core.py b/medusa/server/api/v1/core.py index 8d707185b0..1e80682272 100644 --- a/medusa/server/api/v1/core.py +++ b/medusa/server/api/v1/core.py @@ -1614,7 +1614,7 @@ def run(self): try: api_data = t[str(self.name).encode()] - except (app.IndexerShowNotFound, app.indexer_showincomplete, app.IndexerError): + except (app.IndexerShowNotFound, app.IndexerShowIncomplete, app.IndexerError): logger.log(u"API :: Unable to find show with id " + str(self.indexerid), logger.WARNING) continue @@ -1639,7 +1639,7 @@ def run(self): try: my_show = t[int(self.indexerid)] - except (app.IndexerShowNotFound, app.indexer_showincomplete, app.IndexerError): + except (app.IndexerShowNotFound, app.IndexerShowIncomplete, app.IndexerError): logger.log(u"API :: Unable to find show with id " + str(self.indexerid), logger.WARNING) return _responds(RESULT_SUCCESS, {"results": [], "langid": lang_id})