1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 14:55:07 -05:00

Resolves issue #13

This commit is contained in:
echel0n 2014-03-18 07:41:46 -07:00
parent fc24efb957
commit aa8667106f

View File

@ -227,8 +227,6 @@ class QueueItemAdd(ShowQueueItem):
ShowQueueItem.execute(self) ShowQueueItem.execute(self)
logger.log(u"Starting to add show " + self.showDir) logger.log(u"Starting to add show " + self.showDir)
try:
# make sure the indexer ids are valid # make sure the indexer ids are valid
try: try:
@ -243,7 +241,7 @@ class QueueItemAdd(ShowQueueItem):
s = t[self.indexer_id] s = t[self.indexer_id]
# this usually only happens if they have an NFO in their show dir which gave us a indexer ID that has no proper english version of the show # this usually only happens if they have an NFO in their show dir which gave us a indexer ID that has no proper english version of the show
if not s['seriesname']: if getattr(s, 'seriesname', None) is None:
logger.log(u"Show in " + self.showDir + " has no name on " + self.indexer + ", probably the wrong language used to search with.", logger.ERROR) logger.log(u"Show in " + self.showDir + " has no name on " + self.indexer + ", probably the wrong language used to search with.", logger.ERROR)
ui.notifications.error("Unable to add show", "Show in " + self.showDir + " has no name on " + self.indexer + ", probably the wrong language. Delete .nfo and add manually in the correct language.") ui.notifications.error("Unable to add show", "Show in " + self.showDir + " has no name on " + self.indexer + ", probably the wrong language. Delete .nfo and add manually in the correct language.")
self._finishEarly() self._finishEarly()
@ -254,12 +252,13 @@ class QueueItemAdd(ShowQueueItem):
ui.notifications.error("Unable to add show", "Show " + str(s['seriesname']) + " is on " + self.indexer + " but contains no season/episode data.") ui.notifications.error("Unable to add show", "Show " + str(s['seriesname']) + " is on " + self.indexer + " but contains no season/episode data.")
self._finishEarly() self._finishEarly()
return return
except indexer_exceptions.indexer_exception, e: except Exception, e:
logger.log(u"Error contacting " + self.indexer + ": " + ex(e), logger.ERROR) logger.log(u"Unable to find show ID:" + self.indexer_id + "on Indexer: " + self.indexer, logger.ERROR)
ui.notifications.error("Unable to add show", "Unable to look up the show in " + self.showDir + " on " + self.indexer + ", not using the NFO. Delete .nfo and add manually in the correct language or try a different Indexer.") ui.notifications.error("Unable to add show", "Unable to look up the show in " + self.showDir + " on " + self.indexer + " using ID " + self.indexer_id + ", not using the NFO. Delete .nfo and try adding manually again.")
self._finishEarly() self._finishEarly()
return return
try:
# clear the name cache # clear the name cache
name_cache.clearCache() name_cache.clearCache()
@ -306,8 +305,6 @@ class QueueItemAdd(ShowQueueItem):
except imdb_exceptions.IMDbError, e: except imdb_exceptions.IMDbError, e:
#todo Insert UI notification #todo Insert UI notification
logger.log(u" Something wrong on IMDb api: " + ex(e), logger.WARNING) logger.log(u" Something wrong on IMDb api: " + ex(e), logger.WARNING)
except imdb_exceptions.IMDbParserError, e:
logger.log(u" IMDb_api parser error: " + ex(e), logger.WARNING)
except Exception, e: except Exception, e:
logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR) logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR)
logger.log(traceback.format_exc(), logger.DEBUG) logger.log(traceback.format_exc(), logger.DEBUG)
@ -464,8 +461,6 @@ class QueueItemUpdate(ShowQueueItem):
self.show.loadIMDbInfo() self.show.loadIMDbInfo()
except imdb_exceptions.IMDbError, e: except imdb_exceptions.IMDbError, e:
logger.log(u" Something wrong on IMDb api: " + ex(e), logger.WARNING) logger.log(u" Something wrong on IMDb api: " + ex(e), logger.WARNING)
except imdb_exceptions.IMDbParserError, e:
logger.log(u" IMDb api parser error: " + ex(e), logger.WARNING)
except Exception, e: except Exception, e:
logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR) logger.log(u"Error loading IMDb info: " + ex(e), logger.ERROR)
logger.log(traceback.format_exc(), logger.DEBUG) logger.log(traceback.format_exc(), logger.DEBUG)