本文整理汇总了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())