本文整理汇总了Python中sickbeard.tv.TVShow.nextEpisode方法的典型用法代码示例。如果您正苦于以下问题:Python TVShow.nextEpisode方法的具体用法?Python TVShow.nextEpisode怎么用?Python TVShow.nextEpisode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sickbeard.tv.TVShow
的用法示例。
在下文中一共展示了TVShow.nextEpisode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: loadShowsFromDB
# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import nextEpisode [as 别名]
def loadShowsFromDB():
"""
Populates the showList with shows from the database
"""
logging.debug("Loading initial show list")
myDB = db.DBConnection()
sqlResults = myDB.select("SELECT * FROM tv_shows")
sickbeard.showList = []
for sqlShow in sqlResults:
try:
curShow = TVShow(int(sqlShow[b"indexer"]), int(sqlShow[b"indexer_id"]))
# Build internal name cache for show
name_cache.buildNameCache(curShow)
# get next episode info
curShow.nextEpisode()
# add show to internal show list
sickbeard.showList.append(curShow)
except Exception as e:
logging.error(
"There was an error creating the show in " + sqlShow[b"location"] + ": " + str(e).decode(
'utf-8'))
logging.debug(traceback.format_exc())
示例2: load_shows_from_db
# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import nextEpisode [as 别名]
def load_shows_from_db():
"""
Populates the showList with shows from the database
"""
logger.log('Loading initial show list', logger.DEBUG)
main_db_con = db.DBConnection()
sql_results = main_db_con.select('SELECT indexer, indexer_id, location FROM tv_shows;')
sickbeard.showList = []
for sql_show in sql_results:
try:
cur_show = TVShow(sql_show[b'indexer'], sql_show[b'indexer_id'])
cur_show.nextEpisode()
sickbeard.showList.append(cur_show)
except Exception as error: # pylint: disable=broad-except
logger.log('There was an error creating the show in {0}: Error {1}'.format
(sql_show[b'location'], error), logger.ERROR)
logger.log(traceback.format_exc(), logger.DEBUG)
示例3: load_shows_from_db
# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import nextEpisode [as 别名]
def load_shows_from_db():
"""
Populates the showList with shows from the database
"""
logger.log(u'Loading initial show list')
my_db = db.DBConnection()
sql_results = my_db.select('SELECT * FROM tv_shows')
sickbeard.showList = []
for sqlShow in sql_results:
try:
cur_show = TVShow(int(sqlShow['indexer']), int(sqlShow['indexer_id']))
cur_show.nextEpisode()
sickbeard.showList.append(cur_show)
except Exception as er:
logger.log('There was an error creating the show in %s: %s' % (
sqlShow['location'], str(er).decode('utf-8', 'replace')), logger.ERROR)
示例4: loadShowsFromDB
# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import nextEpisode [as 别名]
def loadShowsFromDB():
"""
Populates the showList with shows from the database
"""
logger.log(u"Loading initial show list", logger.DEBUG)
myDB = db.DBConnection()
sqlResults = myDB.select("SELECT indexer, indexer_id, location FROM tv_shows;")
sickbeard.showList = []
for sqlShow in sqlResults:
try:
curShow = TVShow(int(sqlShow["indexer"]), int(sqlShow["indexer_id"]))
curShow.nextEpisode()
sickbeard.showList.append(curShow)
except Exception as e:
logger.log(
u"There was an error creating the show in " + sqlShow["location"] + ": " + str(e).decode('utf-8'),
logger.ERROR)
logger.log(traceback.format_exc(), logger.DEBUG)
示例5: load_shows_from_db
# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import nextEpisode [as 别名]
def load_shows_from_db():
"""
Populates the showList with shows from the database
"""
logger.log("Loading initial show list", logger.DEBUG) # pylint: disable=no-member
main_db_con = db.DBConnection()
sql_results = main_db_con.select("SELECT indexer, indexer_id, location FROM tv_shows;")
sickbeard.showList = []
for sql_show in sql_results:
try:
cur_show = TVShow(sql_show[b"indexer"], sql_show[b"indexer_id"])
cur_show.nextEpisode()
sickbeard.showList.append(cur_show)
except Exception as error_msg: # pylint: disable=broad-except
logger.log(
"There was an error creating the show in %s: %s"
% (sql_show[b"location"], str(error_msg).decode()), # pylint: disable=no-member
logger.ERROR,
)
logger.log(traceback.format_exc(), logger.DEBUG) # pylint: disable=no-member
示例6: loadShowsFromDB
# 需要导入模块: from sickbeard.tv import TVShow [as 别名]
# 或者: from sickbeard.tv.TVShow import nextEpisode [as 别名]
def loadShowsFromDB(self):
"""
Populates the showList with shows from the database
"""
logger.log(u"Loading initial show list")
myDB = db.DBConnection()
sqlResults = myDB.select("SELECT * FROM tv_shows")
sickbeard.showList = []
for sqlShow in sqlResults:
try:
curShow = TVShow(int(sqlShow["indexer"]), int(sqlShow["indexer_id"]))
curShow.nextEpisode()
sickbeard.showList.append(curShow)
except Exception, e:
logger.log(
u"There was an error creating the show in "
+ sqlShow["location"]
+ ": "
+ str(e).decode("utf-8", "replace"),
logger.ERROR,
)