本文整理汇总了Python中sickbeard.show_name_helpers.allPossibleShowNames函数的典型用法代码示例。如果您正苦于以下问题:Python allPossibleShowNames函数的具体用法?Python allPossibleShowNames怎么用?Python allPossibleShowNames使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了allPossibleShowNames函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _get_episode_search_strings
def _get_episode_search_strings(self, show, season, episode, add_string=''):
search_string = {'Episode': []}
if not episode:
return []
if show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(episode).replace('-', '|') + '|' + \
episode.strftime('%b')
search_string['Episode'].append(ep_string)
elif show.sports:
for show_name in set(show_name_helpers.allPossibleShowNames(show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(episode).replace('-', '|') + '|' + \
episode.strftime('%b')
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:Wizkidje,项目名称:SickBeard-TVRage,代码行数:28,代码来源:scc.py
示例2: _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
示例3: _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)
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))
return [search_string]
开发者ID:Hellowlol,项目名称:SickRage,代码行数:32,代码来源:t411.py
示例4: _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 = 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 = (
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 = 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
+ " "
+ sickbeard.config.naming_ep_type[2]
% {"seasonnumber": ep_obj.scene_season, "episodenumber": ep_obj.scene_episode}
)
if add_string:
ep_string = ep_string + " %s" % add_string
search_string["Episode"].append(ep_string)
return [search_string]
开发者ID:OneDegreeOffCenter,项目名称:SickRage,代码行数:35,代码来源:rarbg.py
示例5: _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
示例6: _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
示例7: _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)
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} + '|' + \
sickbeard.config.naming_ep_type[3] % {'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:JMnITup,项目名称:SickRage,代码行数:26,代码来源:kat.py
示例8: _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
示例9: _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
示例10: _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
示例11: _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
示例12: _doSearch
def _doSearch(self, search_params, epcount=0, age=0):
results = []
items = {'Season': [], 'Episode': [], 'RSS': []}
for mode in search_params.keys():
for search_string in search_params[mode]:
if mode != 'RSS':
searchURL = self.proxy._buildURL(self.searchurl % (urllib.quote(unidecode(search_string))))
else:
searchURL = self.proxy._buildURL(self.url + 'tv/latest/')
logger.log(u"Search string: " + searchURL, logger.DEBUG)
data = self.getURL(searchURL)
if not data:
continue
re_title_url = self.proxy._buildRE(self.re_title_url)
#Extracting torrent information from data returned by searchURL
match = re.compile(re_title_url, re.DOTALL).finditer(urllib.unquote(data))
for torrent in match:
title = torrent.group('title').replace('_',
'.') #Do not know why but SickBeard skip release with '_' in name
url = torrent.group('url')
id = int(torrent.group('id'))
seeders = int(torrent.group('seeders'))
leechers = int(torrent.group('leechers'))
#Filter unseeded torrent
if mode != 'RSS' and seeders == 0:
continue
#Accept Torrent only from Good People for every Episode Search
if self.confirmed and re.search('(VIP|Trusted|Helper)', torrent.group(0)) is None:
logger.log(u"ThePirateBay Provider found result " + torrent.group(
'title') + " but that doesn't seem like a trusted result so I'm ignoring it", logger.DEBUG)
continue
#Check number video files = episode in season and find the real Quality for full season torrent analyzing files in torrent
if mode == 'Season':
ep_number = int(epcount / len(set(allPossibleShowNames(self.show))))
title = self._find_season_quality(title, id, ep_number)
if not title or not url:
continue
item = title, url, id, seeders, leechers
items[mode].append(item)
#For each search mode sort all the items by seeders
items[mode].sort(key=lambda tup: tup[3], reverse=True)
results += items[mode]
return results
开发者ID:sgtwtf,项目名称:SickRage,代码行数:60,代码来源:thepiratebay.py
示例13: _get_season_search_strings
def _get_season_search_strings(self, show, season):
showNames = show_name_helpers.allPossibleShowNames(show)
result = []
for showName in showNames:
result.append( showName + " S%02d" % season )
return result
开发者ID:brinbois,项目名称:Sick-Beard,代码行数:7,代码来源:cpasbien.py
示例14: _get_episode_search_strings
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': []}
if not ep_obj:
return []
for show_name in set(show_name_helpers.allPossibleShowNames(ep_obj.show)):
ep_string = show_name + ' '
if ep_obj.show.air_by_date:
ep_string += str(ep_obj.airdate).replace('-', '|')
elif ep_obj.show.sports:
ep_string += str(ep_obj.airdate).replace('-', '|') + '|' + \
ep_obj.airdate.strftime('%b')
elif ep_obj.show.anime:
ep_string += "%02d" % int(ep_obj.scene_absolute_number)
else:
ep_string += sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode}
if add_string:
ep_string = ep_string + ' %s' % add_string
search_string['Episode'].append(ep_string)
return [search_string]
开发者ID:quindarious-gooch,项目名称:SickRage,代码行数:25,代码来源:generic.py
示例15: _get_season_search_strings
def _get_season_search_strings(self, show, season=None):
search_string = {"Episode": []}
if not show:
return []
self.show = show
seasonEp = show.getAllEpisodes(season)
wantedEp = [x for x in seasonEp if show.getOverview(x.status) in (Overview.WANTED, Overview.QUAL)]
# If Every episode in Season is a wanted Episode then search for Season first
if wantedEp == seasonEp and not show.air_by_date:
search_string = {"Season": [], "Episode": []}
for show_name in set(allPossibleShowNames(show)):
ep_string = show_name + " S%02d" % int(season) # 1) ShowName SXX -SXXE
search_string["Season"].append(ep_string)
ep_string = show_name + " Season " + str(season) # 2) ShowName Season X
search_string["Season"].append(ep_string)
# Building the search string with the episodes we need
for ep_obj in wantedEp:
search_string["Episode"] += self._get_episode_search_strings(ep_obj)[0]["Episode"]
# If no Episode is needed then return an empty list
if not search_string["Episode"]:
return []
return [search_string]
开发者ID:Xupack,项目名称:Sickbeard-MrOrange,代码行数:31,代码来源:publichd.py
示例16: _get_season_search_strings
def _get_season_search_strings(self, ep_obj):
search_string = {'Season': [], 'Langcat' : ''}
if ep_obj.show.audio_lang=='fr':
langtext=' french'
else:
langtext=''
for show_name in set(allPossibleShowNames(self.show)):
if ep_obj.show.air_by_date or ep_obj.show.sports:
ep_string = show_name + ' ' + str(ep_obj.airdate).split('-')[0]+langtext
search_string['Season'].append(ep_string)
ep_string = show_name + ' Season ' + str(ep_obj.airdate).split('-')[0]+langtext
search_string['Season'].append(ep_string)
elif ep_obj.show.anime:
ep_string = show_name + ' ' + "%02d" % ep_obj.scene_absolute_number+langtext
search_string['Season'].append(ep_string)
else:
ep_string = show_name + ' S%02d' % int(ep_obj.scene_season) + ' -S%02d' % int(
ep_obj.scene_season) + 'E' + ' category:tv' #1) showName SXX -SXXE
search_string['Season'].append(ep_string)
ep_string = show_name + ' Season ' + str(
ep_obj.scene_season) + ' -Ep*' +langtext+ ' category:tv' # 2) showName Season X
search_string['Season'].append(ep_string)
search_string['Langcat']=ep_obj.show.audio_lang
return [search_string]
开发者ID:WuzUrDaddy,项目名称:SickRageVF,代码行数:28,代码来源:kat.py
示例17: _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 = (
sanitizeSceneName(show_name)
+ " "
+ str(datetime.date.fromordinal(sqlEp["airdate"])).replace("-", ".")
)
search_string.append(ep_string)
else:
ep_string = sanitizeSceneName(show_name) + " S%02d" % sqlEp["season"]
search_string.append(ep_string)
return search_string
开发者ID:normtown,项目名称:SickRage,代码行数:34,代码来源:btdigg.py
示例18: _get_season_search_strings
def _get_season_search_strings(self, show, season, wantedEp, searchSeason=False):
search_string = {'Episode': []}
if not show:
return []
self.show = show
if searchSeason:
search_string = {'Season': [], 'Episode': []}
for show_name in set(allPossibleShowNames(show)):
ep_string = show_name + ' S%02d' % int(season) #1) ShowName SXX
search_string['Season'].append(ep_string)
ep_string = show_name + ' Season ' + str(season) + ' -Ep*' #2) ShowName Season X
search_string['Season'].append(ep_string)
for ep_obj in wantedEp:
search_string['Episode'] += self._get_episode_search_strings(ep_obj)[0]['Episode']
if not search_string['Episode']:
return []
return [search_string]
开发者ID:mikevmil,项目名称:Sick-Beard,代码行数:25,代码来源:thepiratebay.py
示例19: _retrieve_show_images_from_tmdb
def _retrieve_show_images_from_tmdb(self, show, type):
types = {
"poster": "poster_path",
"banner": None,
"fanart": "backdrop_path",
"poster_thumb": "poster_path",
"banner_thumb": None,
}
# get TMDB configuration info
tmdb = TMDB(sickbeard.TMDB_API_KEY)
config = tmdb.Configuration()
response = config.info()
base_url = response["images"]["base_url"]
sizes = response["images"]["poster_sizes"]
def size_str_to_int(x):
return float("inf") if x == "original" else int(x[1:])
max_size = max(sizes, key=size_str_to_int)
try:
search = tmdb.Search()
for show_name in set(allPossibleShowNames(show)):
for result in (
search.collection({"query": show_name})["results"] + search.tv({"query": show_name})["results"]
):
if types[type] and getattr(result, types[type]):
return "{0}{1}{2}".format(base_url, max_size, result[types[type]])
except Exception as e:
pass
logger.log(u"Could not find any " + type + " images on TMDB for " + show.name, logger.DEBUG)
开发者ID:mclarkin9681,项目名称:SickRage,代码行数:34,代码来源:generic.py
示例20: _get_episode_search_strings
def _get_episode_search_strings(self, episode, add_string=''):
if not episode:
return []
search_string = {
'Episode': []
}
for show_name in set(allPossibleShowNames(episode.show)):
episode_string = show_name + ' '
if episode.show.air_by_date:
episode_string += str(episode.airdate).replace('-', ' ')
elif episode.show.sports:
episode_string += str(episode.airdate).replace('-', ' ')
episode_string += ('|', ' ')[len(self.proper_strings) > 1]
episode_string += episode.airdate.strftime('%b')
elif episode.show.anime:
episode_string += '%02d' % int(episode.scene_absolute_number)
else:
episode_string += sickbeard.config.naming_ep_type[2] % {
'seasonnumber': episode.scene_season,
'episodenumber': episode.scene_episode,
}
if add_string:
episode_string += ' ' + add_string
search_string['Episode'].append(episode_string.encode('utf-8').strip())
return [search_string]
开发者ID:madtrix74,项目名称:SickRage,代码行数:31,代码来源:GenericProvider.py
注:本文中的sickbeard.show_name_helpers.allPossibleShowNames函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论