本文整理汇总了Python中sickbeard.tvcache.TVCache.findNeededEpisodes方法的典型用法代码示例。如果您正苦于以下问题:Python TVCache.findNeededEpisodes方法的具体用法?Python TVCache.findNeededEpisodes怎么用?Python TVCache.findNeededEpisodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sickbeard.tvcache.TVCache
的用法示例。
在下文中一共展示了TVCache.findNeededEpisodes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GenericProvider
# 需要导入模块: from sickbeard.tvcache import TVCache [as 别名]
# 或者: from sickbeard.tvcache.TVCache import findNeededEpisodes [as 别名]
#.........这里部分代码省略.........
result.provider = self
return result
@staticmethod
def get_url_hook(response, **kwargs_):
logger.log(u'{0} URL: {1} [Status: {2}]'.format
(response.request.method, response.request.url, response.status_code), logger.DEBUG)
if response.request.method == 'POST':
logger.log(u'With post data: {0}'.format(response.request.body), logger.DEBUG)
def get_url(self, url, post_data=None, params=None, timeout=30, **kwargs): # pylint: disable=too-many-arguments,
kwargs['hooks'] = {'response': self.get_url_hook}
return getURL(url, post_data, params, self.headers, timeout, self.session, **kwargs)
def image_name(self):
return self.get_id() + '.png'
def is_active(self): # pylint: disable=no-self-use
return False
def is_enabled(self):
return bool(self.enabled)
@staticmethod
def make_id(name):
if not name:
return ''
return re.sub(r'[^\w\d_]', '_', str(name).strip().lower())
def search_rss(self, episodes):
return self.cache.findNeededEpisodes(episodes)
def seed_ratio(self): # pylint: disable=no-self-use
return ''
def _check_auth(self): # pylint: disable=no-self-use
return True
def login(self): # pylint: disable=no-self-use
return True
def search(self, search_params, age=0, ep_obj=None): # pylint: disable=unused-argument,no-self-use
return []
def _get_result(self, episodes): # pylint: disable=no-self-use
return SearchResult(episodes)
def _get_episode_search_strings(self, episode, add_string=''):
if not episode:
return []
search_string = {
'Episode': []
}
for show_name in allPossibleShowNames(episode.show, season=episode.scene_season):
episode_string = show_name + ' '
episode_string_fallback = None
if episode.show.air_by_date:
episode_string += str(episode.airdate).replace('-', ' ')
elif episode.show.sports:
episode_string += str(episode.airdate).replace('-', ' ')
示例2: GenericProvider
# 需要导入模块: from sickbeard.tvcache import TVCache [as 别名]
# 或者: from sickbeard.tvcache.TVCache import findNeededEpisodes [as 别名]
#.........这里部分代码省略.........
result.provider = self
return result
@staticmethod
def get_url_hook(response, **kwargs):
logger.log('{} URL: {} [Status: {}]'.format
(response.request.method, response.request.url, response.status_code), logger.DEBUG)
if response.request.method == 'POST':
logger.log('With post data: {}'.format(response.request.body), logger.DEBUG)
def get_url(self, url, post_data=None, params=None, timeout=30, **kwargs): # pylint: disable=too-many-arguments,
kwargs['hooks'] = {'response': self.get_url_hook}
return getURL(url, post_data, params, self.headers, timeout, self.session, **kwargs)
def image_name(self):
return self.get_id() + '.png'
def is_active(self): # pylint: disable=no-self-use
return False
def is_enabled(self):
return bool(self.enabled)
@staticmethod
def make_id(name):
if not name:
return ''
return re.sub(r'[^\w\d_]', '_', str(name).strip().lower())
def search_rss(self, episodes):
return self.cache.findNeededEpisodes(episodes)
def seed_ratio(self): # pylint: disable=no-self-use
return ''
def _check_auth(self): # pylint: disable=no-self-use
return True
def login(self): # pylint: disable=no-self-use
return True
def search(self, search_params, age=0, ep_obj=None): # pylint: disable=unused-argument,no-self-use
return []
def _get_result(self, episodes): # pylint: disable=no-self-use
return SearchResult(episodes)
def _get_episode_search_strings(self, episode, add_string=''):
if not episode:
return []
search_string = {
'Episode': []
}
for show_name in allPossibleShowNames(episode.show, season=episode.scene_season):
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]
示例3: GenericProvider
# 需要导入模块: from sickbeard.tvcache import TVCache [as 别名]
# 或者: from sickbeard.tvcache.TVCache import findNeededEpisodes [as 别名]
#.........这里部分代码省略.........
def get_quality(self, item, anime=False):
(title, _) = self._get_title_and_url(item)
quality = Quality.sceneQuality(title, anime)
return quality
def get_result(self, episodes):
result = self._get_result(episodes)
result.provider = self
return result
def get_url(self, url, post_data=None, params=None, timeout=30, json=False, need_bytes=False): # pylint: disable=too-many-arguments,
return getURL(url, post_data=post_data, params=params, headers=self.headers, timeout=timeout,
session=self.session, json=json, need_bytes=need_bytes)
def image_name(self):
return self.get_id() + '.png'
def is_active(self): # pylint: disable=no-self-use
return False
def is_enabled(self):
return bool(self.enabled)
@staticmethod
def make_id(name):
if not name:
return ''
return re.sub(r'[^\w\d_]', '_', str(name).strip().lower())
def search_rss(self, episodes):
return self.cache.findNeededEpisodes(episodes)
def seed_ratio(self): # pylint: disable=no-self-use
return ''
def _check_auth(self): # pylint: disable=no-self-use
return True
def login(self): # pylint: disable=no-self-use
return True
def search(self, search_params, age=0, ep_obj=None): # pylint: disable=unused-argument,no-self-use
return []
def _get_result(self, episodes): # pylint: disable=no-self-use
return SearchResult(episodes)
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]
示例4: GenericProvider
# 需要导入模块: from sickbeard.tvcache import TVCache [as 别名]
# 或者: from sickbeard.tvcache.TVCache import findNeededEpisodes [as 别名]
#.........这里部分代码省略.........
return result
@staticmethod
def get_url_hook(response, **kwargs_):
logger.log(
u"{0} URL: {1} [Status: {2}]".format(response.request.method, response.request.url, response.status_code),
logger.DEBUG,
)
if response.request.method == "POST":
logger.log(u"With post data: {0}".format(response.request.body), logger.DEBUG)
def get_url(self, url, post_data=None, params=None, timeout=30, **kwargs): # pylint: disable=too-many-arguments,
kwargs["hooks"] = {"response": self.get_url_hook}
return getURL(url, post_data, params, self.headers, timeout, self.session, **kwargs)
def image_name(self):
return self.get_id() + ".png"
def is_active(self): # pylint: disable=no-self-use
return False
def is_enabled(self):
return bool(self.enabled)
@staticmethod
def make_id(name):
if not name:
return ""
return re.sub(r"[^\w\d_]", "_", str(name).strip().lower())
def search_rss(self, episodes):
return self.cache.findNeededEpisodes(episodes)
def seed_ratio(self): # pylint: disable=no-self-use
return ""
def _check_auth(self): # pylint: disable=no-self-use
return True
def login(self): # pylint: disable=no-self-use
return True
def search(self, search_params, age=0, ep_obj=None): # pylint: disable=unused-argument,no-self-use
return []
def _get_result(self, episodes): # pylint: disable=no-self-use
return SearchResult(episodes)
def _get_episode_search_strings(self, episode, add_string=""):
if not episode:
return []
search_string = {"Episode": []}
for show_name in allPossibleShowNames(episode.show, season=episode.scene_season):
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: