本文整理汇总了Python中sickbeard.show_name_helpers.sanitizeSceneName函数的典型用法代码示例。如果您正苦于以下问题:Python sanitizeSceneName函数的具体用法?Python sanitizeSceneName怎么用?Python sanitizeSceneName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sanitizeSceneName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _get_episode_search_strings
def _get_episode_search_strings(self, season, episode, add_string=''):
search_string = {'Episode': []}
if self.show.air_by_date:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(episode).replace('-', '|') + '|' + \
episode.strftime('%b')
search_string['Episode'].append(ep_string)
elif self.show.sports:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(episode).replace('-', '|') + '|' + \
episode.strftime('%b')
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': season,
'episodenumber': episode} + '|' + \
sickbeard.config.naming_ep_type[0] % {'seasonnumber': season,
'episodenumber': episode} + '|' + \
sickbeard.config.naming_ep_type[3] % {'seasonnumber': season,
'episodenumber': episode}
ep_string += ' %s' % add_string
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
return [search_string]
开发者ID:jvdpoll,项目名称:SickBeard-TVRage,代码行数:31,代码来源:thepiratebay.py
示例2: _get_episode_search_strings
def _get_episode_search_strings(self, show, season, episode, abd=False, add_string=''):
search_string = {'Episode': []}
if not show:
return []
self.show = show
if abd:
for show_name in set(allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(episode).replace('-','|') + '|' + \
helpers.custom_strftime('%b', episode)
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': season,
'episodenumber': episode} + '|' + \
sickbeard.config.naming_ep_type[0] % {'seasonnumber': season,
'episodenumber': episode} + '|' + \
sickbeard.config.naming_ep_type[3] % {'seasonnumber': season,
'episodenumber': episode} + ' %s category:tv' % add_string
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
return [search_string]
开发者ID:jfrmn,项目名称:SickBeard-TVRage,代码行数:27,代码来源:kat.py
示例3: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': []}
if self.show.air_by_date:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', ' ')
search_string['Episode'].append(ep_string)
elif self.show.sports:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|') + '|' + \
ep_obj.airdate.strftime('%b')
search_string['Episode'].append(ep_string)
elif self.show.anime:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
"%02i" % int(ep_obj.scene_absolute_number)
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode} + '|' + \
sickbeard.config.naming_ep_type[0] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode} + ' %s category:tv' % add_string
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
return [search_string]
开发者ID:donforsickrage,项目名称:SickRage,代码行数:29,代码来源:kat.py
示例4: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=""):
search_string = {"Episode": []}
if not ep_obj:
return []
self.show = ep_obj.show
if ep_obj.show.air_by_date:
for show_name in set(allPossibleShowNames(ep_obj.show)):
ep_string = sanitizeSceneName(show_name) + " " + str(ep_obj.airdate)
search_string["Episode"].append(ep_string)
else:
for show_name in set(allPossibleShowNames(ep_obj.show)):
ep_string = (
sanitizeSceneName(show_name)
+ " "
+ sickbeard.config.naming_ep_type[2]
% {"seasonnumber": ep_obj.season, "episodenumber": ep_obj.episode}
)
for x in add_string.split("|"):
to_search = re.sub("\s+", " ", ep_string + " %s" % x)
search_string["Episode"].append(to_search)
return [search_string]
开发者ID:Xupack,项目名称:Sickbeard-MrOrange,代码行数:27,代码来源:publichd.py
示例5: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': []}
if not ep_obj:
return []
if self.show.air_by_date:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|')
search_string['Episode'].append(ep_string)
elif self.show.sports:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|') + '|' + \
ep_obj.airdate.strftime('%b')
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode}
for x in add_string.split('|'):
to_search = re.sub('\s+', ' ', ep_string + ' %s' % x)
search_string['Episode'].append(to_search)
return [search_string]
开发者ID:sgtwtf,项目名称:SickRage,代码行数:29,代码来源:publichd.py
示例6: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=""):
search_string = {"Episode": []}
if not ep_obj:
return []
if ep_obj.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = (
show_name_helpers.sanitizeSceneName(show_name)
+ " "
+ str(ep_obj.airdate)
+ "|"
+ helpers.custom_strftime("%Y %b {S}", ep_obj.airdate)
)
search_string["Episode"].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = (
show_name_helpers.sanitizeSceneName(show_name)
+ " "
+ sickbeard.config.naming_ep_type[2]
% {"seasonnumber": ep_obj.season, "episodenumber": ep_obj.episode}
+ " %s" % add_string
)
search_string["Episode"].append(re.sub("\s+", " ", ep_string))
return [search_string]
开发者ID:n3sarthin,项目名称:SickBeard-TVRage,代码行数:30,代码来源:iptorrents.py
示例7: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': []}
if not ep_obj:
return []
self.show = ep_obj.show
if ep_obj.show.air_by_date:
for show_name in set(allPossibleShowNames(ep_obj.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate) + '|' + \
helpers.custom_strftime('%Y %b {S}', ep_obj.airdate)
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(ep_obj.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.season,
'episodenumber': ep_obj.episode} + '|' + \
sickbeard.config.naming_ep_type[0] % {'seasonnumber': ep_obj.season,
'episodenumber': ep_obj.episode} + '|' + \
sickbeard.config.naming_ep_type[3] % {'seasonnumber': ep_obj.season,
'episodenumber': ep_obj.episode} + ' %s category:tv' % add_string
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
return [search_string]
开发者ID:Prinz23,项目名称:SickBeard-TVRage,代码行数:28,代码来源:kat.py
示例8: _get_season_search_strings
def _get_season_search_strings(self, ep_obj):
search_string = {"Season": []}
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + " "
if ep_obj.show.air_by_date or ep_obj.show.sports:
ep_string += str(ep_obj.airdate).split("-")[0]
search_string["Season"].append(ep_string)
elif ep_obj.show.anime:
ep_string += "%02d" % ep_obj.scene_absolute_number
search_string["Season"].append(ep_string)
else:
ep_string = "%s S%02d -S%02dE category:tv" % (
sanitizeSceneName(show_name),
ep_obj.scene_season,
ep_obj.scene_season,
) # 1) showName SXX -SXXE
search_string["Season"].append(ep_string)
ep_string = '%s "Season %d" -Ep* category:tv' % (
sanitizeSceneName(show_name),
ep_obj.scene_season,
) # 2) showName "Season X"
search_string["Season"].append(ep_string)
return [search_string]
开发者ID:Cliff1980,项目名称:SickRage,代码行数:25,代码来源:kat.py
示例9: _get_season_search_strings
def _get_season_search_strings(self, show, season=None):
search_string = []
if not show:
return []
myDB = db.DBConnection()
if show.air_by_date:
(min_date, max_date) = self._get_airbydate_season_range(season)
sqlResults = myDB.select("SELECT * FROM tv_episodes WHERE showid = ? AND airdate >= ? AND airdate <= ?", [show.tvdbid, min_date.toordinal(), max_date.toordinal()])
else:
sqlResults = myDB.select("SELECT * FROM tv_episodes WHERE showid = ? AND season = ?", [show.tvdbid, season])
for sqlEp in sqlResults:
if show.getOverview(int(sqlEp["status"])) in (Overview.WANTED, Overview.QUAL):
if show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ str(datetime.date.fromordinal(sqlEp["airdate"])).replace('-', '.')
search_string.append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ sickbeard.config.naming_ep_type[2] % {'seasonnumber': season, 'episodenumber': int(sqlEp["episode"])}
search_string.append(ep_string)
return search_string
开发者ID:mptrs,项目名称:Sick-Beard,代码行数:25,代码来源:torrentshack.py
示例10: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': [],'Langcat': ''}
if not ep_obj:
return []
if self.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + '.' + \
str(ep_obj.airdate).replace('-', '|')
search_string['Episode'].append(ep_string)
elif self.show.sports:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + '.' + \
str(ep_obj.airdate).replace('-', '|') + '|' + \
ep_obj.airdate.strftime('%b')
search_string['Episode'].append(ep_string)
elif self.show.anime:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + '.' + \
"%i" % int(ep_obj.scene_absolute_number)
search_string['Episode'].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) + '.' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode} + ' %s' % add_string
search_string['Episode'].append(re.sub('\s+', '', ep_string))
search_string['Langcat']=ep_obj.show.audio_lang
return [search_string]
开发者ID:WuzUrDaddy,项目名称:SickRageVF,代码行数:34,代码来源:cpasbien.py
示例11: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=""):
search_string = {"Episode": []}
if not ep_obj:
return []
if self.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + " " + str(ep_obj.airdate).replace("-", "|")
search_string["Episode"].append(ep_string)
elif self.show.sports:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = (
sanitizeSceneName(show_name)
+ " "
+ str(ep_obj.airdate).replace("-", "|")
+ "|"
+ ep_obj.airdate.strftime("%b")
)
search_string["Episode"].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = (
show_name_helpers.sanitizeSceneName(show_name)
+ " "
+ sickbeard.config.naming_ep_type[2]
% {"seasonnumber": ep_obj.scene_season, "episodenumber": ep_obj.scene_episode}
)
search_string["Episode"].append(re.sub("\s+", " ", ep_string))
return [search_string]
开发者ID:JMnITup,项目名称:SickRage,代码行数:33,代码来源:torrentday.py
示例12: _get_episode_search_strings
def _get_episode_search_strings(self, show, season, episode, abd=False, add_string=""):
search_string = {"Episode": []}
if not episode:
return []
if abd:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
ep_string = (
sanitizeSceneName(show_name)
+ " "
+ str(episode).replace("-", "|")
+ "|"
+ helpers.custom_strftime("%b", episode)
)
search_string["Episode"].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
ep_string = (
show_name_helpers.sanitizeSceneName(show_name)
+ " "
+ sickbeard.config.naming_ep_type[2] % {"seasonnumber": season, "episodenumber": episode}
)
search_string["Episode"].append(re.sub("\s+", " ", ep_string))
return [search_string]
开发者ID:jfrmn,项目名称:SickBeard-TVRage,代码行数:28,代码来源:torrentleech.py
示例13: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
if not ep_obj:
return search_strings
search_strings = []
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
if self.show.air_by_date:
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|')
elif self.show.sports:
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|') + '|' + \
ep_obj.airdate.strftime('%b')
elif self.show.anime:
ep_string = sanitizeSceneName(show_name) + ' ' + \
"%i" % int(ep_obj.scene_absolute_number)
else:
ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode}
if add_string:
ep_string += ' %s' % add_string
search_strings.append(ep_string)
return [search_strings]
开发者ID:EmnaX,项目名称:SickRage,代码行数:26,代码来源:hdtorrents.py
示例14: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=""):
search_string = {"Episode": []}
for show_name in set(allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + " "
if self.show.air_by_date:
ep_string += str(ep_obj.airdate).replace("-", " ")
elif self.show.sports:
ep_string += str(ep_obj.airdate).replace("-", " ") + "|" + ep_obj.airdate.strftime("%b")
elif self.show.anime:
ep_string += "%02d" % ep_obj.scene_absolute_number
else:
ep_string += (
sickbeard.config.naming_ep_type[2]
% {"seasonnumber": ep_obj.scene_season, "episodenumber": ep_obj.scene_episode}
+ "|"
+ sickbeard.config.naming_ep_type[0]
% {"seasonnumber": ep_obj.scene_season, "episodenumber": ep_obj.scene_episode}
+ " category:tv"
)
if add_string:
ep_string += " " + add_string
search_string["Episode"].append(re.sub("\s+", " ", ep_string))
return [search_string]
开发者ID:Cliff1980,项目名称:SickRage,代码行数:26,代码来源:kat.py
示例15: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': []}
if not ep_obj:
return []
if ep_obj.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ str(ep_obj.airdate)
search_string['Episode'].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode}
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
return [search_string]
开发者ID:vertigo235,项目名称:Sick-Beard-XEM,代码行数:19,代码来源:torrentday.py
示例16: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj,french=None):
search_string = {'Episode': []}
if not ep_obj:
return []
if ep_obj.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ str(ep_obj.airdate)
search_string['Episode'].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season, 'episodenumber': ep_obj.scene_episode} +'|'+\
sickbeard.config.naming_ep_type[0] % {'seasonnumber': ep_obj.scene_season, 'episodenumber': ep_obj.scene_episode} +'|'+\
sickbeard.config.naming_ep_type[3] % {'seasonnumber': ep_obj.scene_season, 'episodenumber': ep_obj.scene_episode} \
search_string['Episode'].append(ep_string)
return [search_string]
开发者ID:Arakmar,项目名称:Sick-Beard,代码行数:21,代码来源:__init__.py
示例17: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj):
search_string = {"Episode": []}
if not ep_obj:
return []
if ep_obj.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = show_name_helpers.sanitizeSceneName(show_name) + " " + str(ep_obj.airdate)
search_string["Episode"].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = (
show_name_helpers.sanitizeSceneName(show_name)
+ " "
+ sickbeard.config.naming_ep_type[2]
% {"seasonnumber": ep_obj.season, "episodenumber": ep_obj.episode}
)
search_string["Episode"].append(ep_string)
return [search_string]
开发者ID:majello,项目名称:Sick-Beard-Majello,代码行数:22,代码来源:thepiratebay.py
示例18: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj):
search_string = {'Episode': []}
if not ep_obj:
return []
self.show = ep_obj.show
if ep_obj.show.air_by_date:
for show_name in set(allPossibleShowNames(ep_obj.show)):
ep_string = sanitizeSceneName(show_name) +' '+ str(ep_obj.airdate)
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(ep_obj.show)):
ep_string = sanitizeSceneName(show_name) +' '+ \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode} +'|'+\
sickbeard.config.naming_ep_type[0] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode} +'|'+\
sickbeard.config.naming_ep_type[3] % {'seasonnumber': ep_obj.season, 'episodenumber': ep_obj.episode} + ' category:tv' \
search_string['Episode'].append(ep_string)
return [search_string]
开发者ID:meza,项目名称:Sick-Beard-TPB,代码行数:23,代码来源:kat.py
示例19: _get_season_search_strings
def _get_season_search_strings(self, show, season=None):
search_string = []
if not (show and season):
return []
myDB = db.DBConnection()
if show.air_by_date:
(min_date, max_date) = self._get_airbydate_season_range(season)
sqlResults = myDB.select("SELECT DISTINCT airdate FROM tv_episodes WHERE showid = ? AND airdate >= ? AND airdate <= ? AND status = ?", [show.tvdbid, min_date.toordinal(), max_date.toordinal(), WANTED])
else:
sqlResults = myDB.select("SELECT DISTINCT season FROM tv_episodes WHERE showid = ? AND season = ? AND status = ?", [show.tvdbid, season, WANTED])
for sqlEp in sqlResults:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
if show.air_by_date:
ep_string = show_name_helpers.sanitizeSceneName(show_name) +' '+ str(datetime.date.fromordinal(sqlEp["airdate"])).replace('-', '.')
search_string.append(ep_string)
else:
ep_string = show_name_helpers.sanitizeSceneName(show_name) + ' S%02d' % sqlEp["season"]
search_string.append(ep_string)
return search_string
开发者ID:EmnaX,项目名称:SickRage,代码行数:24,代码来源:btdigg.py
示例20: _get_episode_search_strings
def _get_episode_search_strings(self, show, season, episode, abd=False, add_string=''):
search_string = {'Episode': []}
if not episode:
return []
if abd:
for show_name in set(allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(episode).replace('-', '|') + '|' + \
helpers.custom_strftime('%b', episode)
search_string['Episode'].append(ep_string)
else:
for show_name in set(allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': season,
'episodenumber': episode}
for x in add_string.split('|'):
to_search = re.sub('\s+', ' ', ep_string + ' %s' % x)
search_string['Episode'].append(to_search)
return [search_string]
开发者ID:jfrmn,项目名称:SickBeard-TVRage,代码行数:24,代码来源:publichd.py
注:本文中的sickbeard.show_name_helpers.sanitizeSceneName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论