diff --git a/CHANGES.md b/CHANGES.md index fe696986..f9ff4761 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -128,6 +128,11 @@ * Fix article link color on some page were changed blue +### 0.12.31 (2017-10-06 22:30:00 UTC) + +* Change improve handling of connection failures for metadata during media processing + + ### 0.12.30 (2017-09-29 00:20:00 UTC) * Fix Media Providers/Custom Newznab tab action 'Delete' then 'Save Changes' diff --git a/sickbeard/metadata/xbmc_12plus.py b/sickbeard/metadata/xbmc_12plus.py index 8081dfba..ddd74897 100644 --- a/sickbeard/metadata/xbmc_12plus.py +++ b/sickbeard/metadata/xbmc_12plus.py @@ -256,6 +256,9 @@ class XBMC_12PlusMetadata(generic.GenericMetadata): curEpToWrite.episode) + " on " + sickbeard.indexerApi( ep_obj.show.indexer).name + ".. has it been removed? Should I delete from db?") return None + except (StandardError, Exception): + logger.log(u"Not generating nfo because failed to fetched tv info data at this time", logger.DEBUG) + return None if getattr(myEp, 'firstaired', None) is None: myEp["firstaired"] = str(datetime.date.fromordinal(1)) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 919c1a5e..78d07169 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -36,6 +36,8 @@ from name_parser.parser import NameParser, InvalidNameException, InvalidShowExce from lib import subliminal import fnmatch +from imdb._exceptions import IMDbError + try: from lib.send2trash import send2trash except ImportError: @@ -1068,8 +1070,12 @@ class TVShow(object): 'votes': '', 'last_update': ''} - i = imdb.IMDb() - imdbTv = i.get_movie(str(re.sub('[^0-9]', '', self.imdbid or '%07d' % self.ids[indexermapper.INDEXER_IMDB]['id']))) + try: + i = imdb.IMDb() + imdbTv = i.get_movie( + str(re.sub('[^0-9]', '', self.imdbid or '%07d' % self.ids[indexermapper.INDEXER_IMDB]['id']))) + except IMDbError: + return for key in filter(lambda x: x.replace('_', ' ') in imdbTv.keys(), imdb_info.keys()): # Store only the first value for string type