mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 10:33:38 +00:00
Change provider OMGWTFNZBS api url and auto reject nuked releases.
Change provider page to load torrent settings only when Search torrents is enabled in Search Settings.
This commit is contained in:
parent
e05f92a933
commit
f89624851c
4 changed files with 15 additions and 10 deletions
|
@ -88,6 +88,8 @@
|
||||||
* Add ILT torrent provider
|
* Add ILT torrent provider
|
||||||
* Add Fano torrent provider
|
* Add Fano torrent provider
|
||||||
* Change CPU throttling on General Config/Advanced to "Disabled" by default for new installs
|
* Change CPU throttling on General Config/Advanced to "Disabled" by default for new installs
|
||||||
|
* Change provider OMGWTFNZBS api url and auto reject nuked releases
|
||||||
|
* Change Search Provider page to load torrent settings only when Search torrents is enabled in Search Settings
|
||||||
|
|
||||||
|
|
||||||
### 0.11.11 (2016-04-05 19:20:00 UTC)
|
### 0.11.11 (2016-04-05 19:20:00 UTC)
|
||||||
|
|
|
@ -343,8 +343,8 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
##
|
##
|
||||||
#for $cur_torrent_provider in [$cur_provider for $cur_provider in $sickbeard.providers.sortedProviderList()
|
#for $cur_torrent_provider in $sickbeard.USE_TORRENTS and [$cur_provider for $cur_provider in $sickbeard.providers.sortedProviderList()
|
||||||
if $cur_provider.providerType == $GenericProvider.TORRENT]:
|
if $cur_provider.providerType == $GenericProvider.TORRENT] or []:
|
||||||
<div class="providerDiv" id="${cur_torrent_provider.get_id()}Div">
|
<div class="providerDiv" id="${cur_torrent_provider.get_id()}Div">
|
||||||
#if callable(getattr(cur_torrent_provider, 'ui_string', None))
|
#if callable(getattr(cur_torrent_provider, 'ui_string', None))
|
||||||
#set $field_name = cur_torrent_provider.get_id() + '_tip'
|
#set $field_name = cur_torrent_provider.get_id() + '_tip'
|
||||||
|
|
|
@ -38,7 +38,7 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
|
||||||
|
|
||||||
self.url = 'https://omgwtfnzbs.org/'
|
self.url = 'https://omgwtfnzbs.org/'
|
||||||
|
|
||||||
self.url_base = 'https://omgwtfnzbs.org/'
|
self.url_base = 'https://api.omgwtfnzbs.org/'
|
||||||
self.urls = {'config_provider_home_uri': self.url_base,
|
self.urls = {'config_provider_home_uri': self.url_base,
|
||||||
'cache': 'https://rss.omgwtfnzbs.org/rss-download.php?%s',
|
'cache': 'https://rss.omgwtfnzbs.org/rss-download.php?%s',
|
||||||
'search': self.url_base + 'json/?%s',
|
'search': self.url_base + 'json/?%s',
|
||||||
|
@ -46,8 +46,6 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
|
||||||
'cache_html': self.url_base + 'browse.php?cat=tv%s',
|
'cache_html': self.url_base + 'browse.php?cat=tv%s',
|
||||||
'search_html': self.url_base + 'browse.php?cat=tv&search=%s'}
|
'search_html': self.url_base + 'browse.php?cat=tv&search=%s'}
|
||||||
|
|
||||||
self.url = self.urls['config_provider_home_uri']
|
|
||||||
|
|
||||||
self.needs_auth = True
|
self.needs_auth = True
|
||||||
self.username, self.api_key, self.cookies = 3 * [None]
|
self.username, self.api_key, self.cookies = 3 * [None]
|
||||||
self.cache = OmgwtfnzbsCache(self)
|
self.cache = OmgwtfnzbsCache(self)
|
||||||
|
@ -91,7 +89,7 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
|
||||||
|
|
||||||
def _title_and_url(self, item):
|
def _title_and_url(self, item):
|
||||||
|
|
||||||
return item['release'], item['getnzb']
|
return item['release'].replace('_', '.'), item['getnzb']
|
||||||
|
|
||||||
def get_result(self, episodes, url):
|
def get_result(self, episodes, url):
|
||||||
|
|
||||||
|
@ -144,6 +142,7 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
|
||||||
params = {'user': self.username,
|
params = {'user': self.username,
|
||||||
'api': api_key,
|
'api': api_key,
|
||||||
'eng': 1,
|
'eng': 1,
|
||||||
|
'nukes': 1,
|
||||||
'catid': '19,20', # SD,HD
|
'catid': '19,20', # SD,HD
|
||||||
'retention': (sickbeard.USENET_RETENTION, retention)[retention or not sickbeard.USENET_RETENTION],
|
'retention': (sickbeard.USENET_RETENTION, retention)[retention or not sickbeard.USENET_RETENTION],
|
||||||
'search': search}
|
'search': search}
|
||||||
|
@ -155,6 +154,8 @@ class OmgwtfnzbsProvider(generic.NZBProvider):
|
||||||
if data_json and self._check_auth_from_data(data_json, is_xml=False):
|
if data_json and self._check_auth_from_data(data_json, is_xml=False):
|
||||||
for item in data_json:
|
for item in data_json:
|
||||||
if 'release' in item and 'getnzb' in item:
|
if 'release' in item and 'getnzb' in item:
|
||||||
|
if item.get('nuked', '').startswith('1'):
|
||||||
|
continue
|
||||||
results.append(item)
|
results.append(item)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
|
@ -115,10 +115,12 @@ class TorrentDayProvider(generic.TorrentProvider):
|
||||||
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', date_or=True, **kwargs)
|
return generic.TorrentProvider._episode_strings(self, ep_obj, sep_date='.', date_or=True, **kwargs)
|
||||||
|
|
||||||
def ui_string(self, key):
|
def ui_string(self, key):
|
||||||
current_url = self.urls['config_provider_home_uri']
|
if 'torrentday_digest' == key and self._valid_home():
|
||||||
return ('torrentday_digest' == key and
|
current_url = getattr(self, 'urls', {}).get('config_provider_home_uri')
|
||||||
('use... \'uid=xx; pass=yy\' from a session logged in at <a target="_blank" href="%s">%s</a>' %
|
return ('use... \'uid=xx; pass=yy\'' +
|
||||||
(anon_url(current_url), current_url.strip('/'))) or '')
|
(current_url and (' from a session logged in at <a target="_blank" href="%s">%s</a>' %
|
||||||
|
(anon_url(current_url), current_url.strip('/'))) or ''))
|
||||||
|
return ''
|
||||||
|
|
||||||
|
|
||||||
provider = TorrentDayProvider()
|
provider = TorrentDayProvider()
|
||||||
|
|
Loading…
Reference in a new issue