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