mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Change simplify use of provider parameter scene/process_name.
This commit is contained in:
parent
47eab61c01
commit
ab0f8576c9
20 changed files with 28 additions and 69 deletions
|
@ -39,7 +39,7 @@ class BeyondHDProvider(generic.TorrentProvider):
|
|||
|
||||
self.url = self.urls['config_provider_home_uri']
|
||||
|
||||
self.passkey, self.minseed, self.minleech = 3 * [None]
|
||||
self.passkey, self.scene, self.minseed, self.minleech = 4 * [None]
|
||||
|
||||
def _check_auth_from_data(self, data_json):
|
||||
|
||||
|
@ -92,9 +92,5 @@ class BeyondHDProvider(generic.TorrentProvider):
|
|||
|
||||
return results
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, **kwargs)
|
||||
|
||||
|
||||
provider = BeyondHDProvider()
|
||||
|
|
|
@ -49,7 +49,7 @@ class BlutopiaProvider(generic.TorrentProvider):
|
|||
self.may_filter = OrderedDict([
|
||||
('f0', ('not marked', False)), ('free', ('free', True)),
|
||||
('double', ('2x up', True)), ('feat', ('featured', True))])
|
||||
self.digest, self.token, self.resp, self.minseed, self.minleech = 5 * [None]
|
||||
self.digest, self.token, self.resp, self.scene, self.minseed, self.minleech = 6 * [None]
|
||||
|
||||
def logged_in(self, resp):
|
||||
try:
|
||||
|
@ -160,14 +160,6 @@ class BlutopiaProvider(generic.TorrentProvider):
|
|||
|
||||
return results
|
||||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return super(BlutopiaProvider, self)._season_strings(ep_obj, scene=False, **kwargs)
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return super(BlutopiaProvider, self)._episode_strings(ep_obj, scene=False, **kwargs)
|
||||
|
||||
@staticmethod
|
||||
def ui_string(key):
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ class BTSceneProvider(generic.TorrentProvider):
|
|||
return results
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', **kwargs)
|
||||
return super(BTSceneProvider, self)._episode_strings(ep_obj, sep_date='.', **kwargs)
|
||||
|
||||
|
||||
provider = BTSceneProvider()
|
||||
|
|
|
@ -953,7 +953,7 @@ class TorrentProvider(object, GenericProvider):
|
|||
search_params = []
|
||||
crop = re.compile(r'([.\s])(?:\1)+')
|
||||
for name in set(allPossibleShowNames(self.show)):
|
||||
if process_name:
|
||||
if process_name and getattr(self, 'scene', True):
|
||||
name = helpers.sanitizeSceneName(name)
|
||||
for detail in ep_detail:
|
||||
search_params += [crop.sub(r'\1', '%s %s%s' % (name, x, detail)) for x in prefix]
|
||||
|
|
|
@ -42,7 +42,7 @@ class GFTrackerProvider(generic.TorrentProvider):
|
|||
|
||||
self.url = self.urls['config_provider_home_uri']
|
||||
|
||||
self.username, self.password, self.minseed, self.minleech = 4 * [None]
|
||||
self.username, self.password, self.scene, self.minseed, self.minleech = 5 * [None]
|
||||
|
||||
def _authorised(self, **kwargs):
|
||||
|
||||
|
@ -113,13 +113,5 @@ class GFTrackerProvider(generic.TorrentProvider):
|
|||
|
||||
return results
|
||||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._season_strings(self, ep_obj, scene=False)
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, **kwargs)
|
||||
|
||||
|
||||
provider = GFTrackerProvider()
|
||||
|
|
|
@ -123,7 +123,7 @@ class GrabTheInfoProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='|', **kwargs)
|
||||
return super(GrabTheInfoProvider, self)._episode_strings(ep_obj, sep_date='|', **kwargs)
|
||||
|
||||
|
||||
provider = GrabTheInfoProvider()
|
||||
|
|
|
@ -48,7 +48,7 @@ class HDSpaceProvider(generic.TorrentProvider):
|
|||
self.filter = []
|
||||
self.may_filter = OrderedDict([
|
||||
('f0', ('not marked', False, '')), ('f25', ('FL', True, 'gold|sf')), ('f50', ('F/L', True, 'silver|sf'))])
|
||||
self.username, self.password, self.minseed, self.minleech = 4 * [None]
|
||||
self.username, self.password, self.scene, self.minseed, self.minleech = 5 * [None]
|
||||
|
||||
def _authorised(self, **kwargs):
|
||||
|
||||
|
@ -135,13 +135,5 @@ class HDSpaceProvider(generic.TorrentProvider):
|
|||
|
||||
return results
|
||||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._season_strings(self, ep_obj, scene=False)
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, **kwargs)
|
||||
|
||||
|
||||
provider = HDSpaceProvider()
|
||||
|
|
|
@ -47,7 +47,7 @@ class HDTorrentsProvider(generic.TorrentProvider):
|
|||
self.filter = []
|
||||
self.may_filter = OrderedDict(
|
||||
[('f0', ('not marked', False)), ('f25', ('-25%', True)), ('f50', ('-50%', True)), ('f75', ('-75%', True))])
|
||||
self.username, self.password, self.minseed, self.minleech = 4 * [None]
|
||||
self.username, self.password, self.scene, self.minseed, self.minleech = 5 * [None]
|
||||
|
||||
def _authorised(self, **kwargs):
|
||||
|
||||
|
@ -138,11 +138,5 @@ class HDTorrentsProvider(generic.TorrentProvider):
|
|||
|
||||
return results
|
||||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
return generic.TorrentProvider._season_strings(self, ep_obj, scene=False, **kwargs)
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, sep_date=' ', **kwargs)
|
||||
|
||||
|
||||
provider = HDTorrentsProvider()
|
||||
|
|
|
@ -42,7 +42,7 @@ class NebulanceProvider(generic.TorrentProvider):
|
|||
self.user_authkey, self.user_passkey = 2 * [None]
|
||||
self.chk_td = True
|
||||
|
||||
self.username, self.password, self.freeleech, self.minseed, self.minleech = 5 * [None]
|
||||
self.username, self.password, self.freeleech, self.scene, self.minseed, self.minleech = 6 * [None]
|
||||
|
||||
def _authorised(self, **kwargs):
|
||||
|
||||
|
@ -157,13 +157,5 @@ class NebulanceProvider(generic.TorrentProvider):
|
|||
title += + any(tags[4]) and ('.%s' % tags[4][0]) or ''
|
||||
return title
|
||||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._season_strings(self, ep_obj, scene=False)
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, **kwargs)
|
||||
|
||||
|
||||
provider = NebulanceProvider()
|
||||
|
|
|
@ -168,7 +168,7 @@ class RarbgProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
search_params = generic.TorrentProvider._episode_strings(self, ep_obj, detail_only=True, date_or=True, **kwargs)
|
||||
search_params = super(RarbgProvider, self)._episode_strings(ep_obj, detail_only=True, date_or=True, **kwargs)
|
||||
if self.show.air_by_date and self.show.is_sports:
|
||||
for x, types in enumerate(search_params):
|
||||
for y, ep_type in enumerate(types):
|
||||
|
|
|
@ -44,7 +44,7 @@ class ShazbatProvider(generic.TorrentProvider):
|
|||
|
||||
self.url = self.urls['config_provider_home_uri']
|
||||
|
||||
self.username, self.password, self.minseed, self.minleech = 4 * [None]
|
||||
self.username, self.password, self.scene, self.minseed, self.minleech = 5 * [None]
|
||||
|
||||
def _authorised(self, **kwargs):
|
||||
|
||||
|
@ -137,11 +137,11 @@ class ShazbatProvider(generic.TorrentProvider):
|
|||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._season_strings(self, ep_obj, detail_only=True, scene=False)
|
||||
return super(ShazbatProvider, self)._season_strings(ep_obj, detail_only=True)
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, detail_only=True, scene=False, **kwargs)
|
||||
return super(ShazbatProvider, self)._episode_strings(ep_obj, detail_only=True, **kwargs)
|
||||
|
||||
|
||||
provider = ShazbatProvider()
|
||||
|
|
|
@ -116,7 +116,7 @@ class SpeedCDProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, sep_date='.', **kwargs)
|
||||
return super(SpeedCDProvider, self)._episode_strings(ep_obj, scene=False, sep_date='.', **kwargs)
|
||||
|
||||
@staticmethod
|
||||
def ui_string(key):
|
||||
|
|
|
@ -169,10 +169,10 @@ class ThePirateBayProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, date_or=True,
|
||||
ep_detail=lambda x: '%s|%s' % (config.naming_ep_type[2] % x,
|
||||
config.naming_ep_type[0] % x),
|
||||
ep_detail_anime=lambda x: '%02i' % x, **kwargs)
|
||||
return super(ThePirateBayProvider, self)._episode_strings(
|
||||
ep_obj, date_or=True,
|
||||
ep_detail=lambda x: '%s|%s' % (config.naming_ep_type[2] % x, config.naming_ep_type[0] % x),
|
||||
ep_detail_anime=lambda x: '%02i' % x, **kwargs)
|
||||
|
||||
def _search_provider(self, search_params, search_mode='eponly', epcount=0, **kwargs):
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ class TorrentDayProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', date_or=True, **kwargs)
|
||||
return super(TorrentDayProvider, self)._episode_strings(ep_obj, sep_date='.', date_or=True, **kwargs)
|
||||
|
||||
def ui_string(self, key):
|
||||
if 'torrentday_digest' == key and self._valid_home():
|
||||
|
|
|
@ -109,7 +109,7 @@ class TorrentLeechProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='|', **kwargs)
|
||||
return super(TorrentLeechProvider, self)._episode_strings(ep_obj, sep_date='|', **kwargs)
|
||||
|
||||
|
||||
provider = TorrentLeechProvider()
|
||||
|
|
|
@ -116,7 +116,7 @@ class TorrentVaultProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', **kwargs)
|
||||
return super(TorrentVaultProvider, self)._episode_strings(ep_obj, sep_date='.', **kwargs)
|
||||
|
||||
|
||||
provider = TorrentVaultProvider()
|
||||
|
|
|
@ -138,8 +138,8 @@ class Torrentz2Provider(generic.TorrentProvider):
|
|||
return results
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
return generic.TorrentProvider._episode_strings(
|
||||
self, ep_obj, date_detail=(lambda d: [x % str(d).replace('-', '.') for x in ('"%s"', '%s')]),
|
||||
return super(Torrentz2Provider, self)._episode_strings(
|
||||
ep_obj, date_detail=(lambda d: [x % str(d).replace('-', '.') for x in ('"%s"', '%s')]),
|
||||
ep_detail=(lambda ep_dict: [x % (config.naming_ep_type[2] % ep_dict) for x in ('"%s"', '%s')]), **kwargs)
|
||||
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ class TVChaosUKProvider(generic.TorrentProvider):
|
|||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, scene=False, prefix='%', date_detail=(
|
||||
return super(TVChaosUKProvider, self)._episode_strings(ep_obj, scene=False, prefix='%', date_detail=(
|
||||
lambda d: [x.strip('0') for x in (
|
||||
['{0} {1}% {2}'.format(d.strftime('%d')[-1], d.strftime('%b'), d.strftime('%Y'))] +
|
||||
[d.strftime('%d %b %Y')] + ([d.strftime('%d %B %Y')], [])[d.strftime('%b') == d.strftime('%B')])]),
|
||||
|
|
|
@ -118,11 +118,11 @@ class WOPProvider(generic.TorrentProvider):
|
|||
|
||||
def _season_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return self._search_params(generic.TorrentProvider._season_strings(self, ep_obj, **kwargs))
|
||||
return self._search_params(super(WOPProvider, self)._season_strings(ep_obj, **kwargs))
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
|
||||
return self._search_params(generic.TorrentProvider._episode_strings(self, ep_obj, **kwargs))
|
||||
return self._search_params(super(WOPProvider, self)._episode_strings(ep_obj, **kwargs))
|
||||
|
||||
@staticmethod
|
||||
def _search_params(search_params):
|
||||
|
|
|
@ -107,9 +107,10 @@ class ZooqleProvider(generic.TorrentProvider):
|
|||
return results
|
||||
|
||||
def _episode_strings(self, ep_obj, **kwargs):
|
||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', **kwargs)
|
||||
return super(ZooqleProvider, self)._episode_strings(ep_obj, sep_date='.', **kwargs)
|
||||
|
||||
def _cache_data(self, **kwargs):
|
||||
return self._search_provider({'Cache': ['*']})
|
||||
|
||||
|
||||
provider = ZooqleProvider()
|
||||
|
|
Loading…
Reference in a new issue