diff --git a/sickbeard/metadata/generic.py b/sickbeard/metadata/generic.py index bacc97bf..417a5a19 100644 --- a/sickbeard/metadata/generic.py +++ b/sickbeard/metadata/generic.py @@ -789,7 +789,7 @@ class GenericMetadata(): show_obj.indexer).name + ", not downloading images: " + ex(e), logger.ERROR) return None - if not indexer_show_obj: + if not isinstance(indexer_show_obj, dict) or None is getattr(indexer_show_obj, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (show_obj.name, sickbeard.indexerApi(show_obj.indexer).name), logger.WARNING) return None @@ -881,7 +881,7 @@ class GenericMetadata(): show_obj.indexer).name + ', not downloading images: ' + ex(e), logger.ERROR) return result - if not indexer_show_obj: + if not isinstance(indexer_show_obj, dict) or None is getattr(indexer_show_obj, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (show_obj.name, sickbeard.indexerApi(show_obj.indexer).name), logger.WARNING) return result diff --git a/sickbeard/metadata/kodi.py b/sickbeard/metadata/kodi.py index e2368414..bddc0b89 100644 --- a/sickbeard/metadata/kodi.py +++ b/sickbeard/metadata/kodi.py @@ -124,7 +124,7 @@ class KODIMetadata(generic.GenericMetadata): logger.ERROR) raise - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (show_obj.name, sickbeard.indexerApi(show_obj.indexer).name), logger.WARNING) return @@ -246,7 +246,7 @@ class KODIMetadata(generic.GenericMetadata): ep_obj.show.indexer).name + ' while creating meta files - skipping - ' + ex(e), logger.ERROR) return - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (ep_obj.show.name, sickbeard.indexerApi(ep_obj.show.indexer).name), logger.WARNING) return diff --git a/sickbeard/metadata/mede8er.py b/sickbeard/metadata/mede8er.py index bf8eb71d..9bf7a4fa 100644 --- a/sickbeard/metadata/mede8er.py +++ b/sickbeard/metadata/mede8er.py @@ -129,7 +129,7 @@ class Mede8erMetadata(mediabrowser.MediaBrowserMetadata): logger.log(u"TVDB is down, can't use its data to make the NFO", logger.ERROR) raise - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (show_obj.name, sickbeard.indexerApi(show_obj.indexer).name), logger.WARNING) return @@ -247,7 +247,7 @@ class Mede8erMetadata(mediabrowser.MediaBrowserMetadata): logger.log(u"Unable to connect to TVDB while creating meta files - skipping - " + ex(e), logger.ERROR) return False - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (ep_obj.show.name, sickbeard.indexerApi(ep_obj.show.indexer).name), logger.WARNING) return diff --git a/sickbeard/metadata/mediabrowser.py b/sickbeard/metadata/mediabrowser.py index 7ef95e22..28853a14 100644 --- a/sickbeard/metadata/mediabrowser.py +++ b/sickbeard/metadata/mediabrowser.py @@ -256,7 +256,7 @@ class MediaBrowserMetadata(generic.GenericMetadata): logger.ERROR) raise - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (show_obj.name, sickbeard.indexerApi(show_obj.indexer).name), logger.WARNING) return @@ -421,7 +421,7 @@ class MediaBrowserMetadata(generic.GenericMetadata): ep_obj.show.indexer).name + " while creating meta files - skipping - " + ex(e), logger.ERROR) return False - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (ep_obj.show.name, sickbeard.indexerApi(ep_obj.show.indexer).name), logger.WARNING) return diff --git a/sickbeard/metadata/tivo.py b/sickbeard/metadata/tivo.py index 3eae82ce..9695049a 100644 --- a/sickbeard/metadata/tivo.py +++ b/sickbeard/metadata/tivo.py @@ -188,7 +188,7 @@ class TIVOMetadata(generic.GenericMetadata): ep_obj.show.indexer).name + " while creating meta files - skipping - " + str(e), logger.ERROR) return False - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (ep_obj.show.name, sickbeard.indexerApi(ep_obj.show.indexer).name), logger.WARNING) return diff --git a/sickbeard/metadata/wdtv.py b/sickbeard/metadata/wdtv.py index 00817a90..29f91b8f 100644 --- a/sickbeard/metadata/wdtv.py +++ b/sickbeard/metadata/wdtv.py @@ -199,7 +199,7 @@ class WDTVMetadata(generic.GenericMetadata): ep_obj.show.indexer).name + " while creating meta files - skipping - " + ex(e), logger.ERROR) return False - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (ep_obj.show.name, sickbeard.indexerApi(ep_obj.show.indexer).name), logger.WARNING) return diff --git a/sickbeard/metadata/xbmc_12plus.py b/sickbeard/metadata/xbmc_12plus.py index 58a3708f..5b62577f 100644 --- a/sickbeard/metadata/xbmc_12plus.py +++ b/sickbeard/metadata/xbmc_12plus.py @@ -124,7 +124,7 @@ class XBMC_12PlusMetadata(generic.GenericMetadata): logger.ERROR) raise - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (show_obj.name, sickbeard.indexerApi(show_obj.indexer).name), logger.WARNING) return @@ -246,7 +246,7 @@ class XBMC_12PlusMetadata(generic.GenericMetadata): ep_obj.show.indexer).name + " while creating meta files - skipping - " + ex(e), logger.ERROR) return - if not myShow: + if not isinstance(myShow, dict) or None is getattr(myShow, 'seriesname', None): logger.log(u'Show %s not found on %s ' % (ep_obj.show.name, sickbeard.indexerApi(ep_obj.show.indexer).name), logger.WARNING) return