本文整理匯總了Python中sickrage.core.tv.show.TVShow.loadTMDbInfo方法的典型用法代碼示例。如果您正苦於以下問題:Python TVShow.loadTMDbInfo方法的具體用法?Python TVShow.loadTMDbInfo怎麽用?Python TVShow.loadTMDbInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sickrage.core.tv.show.TVShow
的用法示例。
在下文中一共展示了TVShow.loadTMDbInfo方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: QueueItemAdd
# 需要導入模塊: from sickrage.core.tv.show import TVShow [as 別名]
# 或者: from sickrage.core.tv.show.TVShow import loadTMDbInfo [as 別名]
#.........這裏部分代碼省略.........
# if self.show.genre and "talk show" in self.show.genre.lower():
# self.show.air_by_date = 1
# if self.show.genre and "documentary" in self.show.genre.lower():
# self.show.air_by_date = 0
# if self.show.classification and "sports" in self.show.classification.lower():
# self.show.sports = 1
except indexer_exception as e:
sickrage.srCore.srLogger.error(
"Unable to add show due to an error with " + srIndexerApi(
self.indexer).name + ": {}".format(e.message))
if self.show:
sickrage.srCore.srNotifications.error(
"Unable to add " + str(self.show.name) + " due to an error with " + srIndexerApi(
self.indexer).name + "")
else:
sickrage.srCore.srNotifications.error(
"Unable to add show due to an error with " + srIndexerApi(self.indexer).name + "")
return self._finishEarly()
except MultipleShowObjectsException:
sickrage.srCore.srLogger.warning("The show in " + self.showDir + " is already in your show list, skipping")
sickrage.srCore.srNotifications.error('Show skipped',
"The show in " + self.showDir + " is already in your show list")
return self._finishEarly()
except Exception as e:
sickrage.srCore.srLogger.error("Error trying to add show: {}".format(e.message))
sickrage.srCore.srLogger.debug(traceback.format_exc())
raise self._finishEarly()
sickrage.srCore.srLogger.debug("Retrieving show info from TMDb")
try:
self.show.loadTMDbInfo()
except Exception as e:
sickrage.srCore.srLogger.error("Error loading TMDb info: {}".format(e.message))
try:
sickrage.srCore.srLogger.debug("Attempting to retrieve show info from IMDb")
self.show.loadIMDbInfo()
except Exception as e:
sickrage.srCore.srLogger.error("Error loading IMDb info: {}".format(e.message))
# Load XEM data to DB for show
xem_refresh(self.show.indexerid, self.show.indexer, force=True)
# check if show has XEM mapping so we can determin if searches should go by scene numbering or indexer numbering.
if not self.scene and get_xem_numbering_for_show(self.show.indexerid, self.show.indexer):
self.show.scene = 1
try:
self.show.saveToDB()
except Exception as e:
sickrage.srCore.srLogger.error("Error saving the show to the database: {}".format(e.message))
sickrage.srCore.srLogger.debug(traceback.format_exc())
raise self._finishEarly()
# add it to the show list
sickrage.srCore.SHOWLIST.append(self.show)
try:
self.show.loadEpisodesFromIndexer()
except Exception as e:
sickrage.srCore.srLogger.error(
"Error with " + srIndexerApi(
self.show.indexer).name + ", not creating episode list: {}".format(e.message))
sickrage.srCore.srLogger.debug(traceback.format_exc())