diff --git a/CHANGES.md b/CHANGES.md index 50278af8..5001985d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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) diff --git a/gui/slick/interfaces/default/config_providers.tmpl b/gui/slick/interfaces/default/config_providers.tmpl index 6200f023..5463f446 100644 --- a/gui/slick/interfaces/default/config_providers.tmpl +++ b/gui/slick/interfaces/default/config_providers.tmpl @@ -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 []:
#if callable(getattr(cur_torrent_provider, 'ui_string', None)) #set $field_name = cur_torrent_provider.get_id() + '_tip' diff --git a/sickbeard/providers/omgwtfnzbs.py b/sickbeard/providers/omgwtfnzbs.py index bfd64457..492b7ecb 100644 --- a/sickbeard/providers/omgwtfnzbs.py +++ b/sickbeard/providers/omgwtfnzbs.py @@ -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 diff --git a/sickbeard/providers/torrentday.py b/sickbeard/providers/torrentday.py index a25aa667..9ded8c53 100644 --- a/sickbeard/providers/torrentday.py +++ b/sickbeard/providers/torrentday.py @@ -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 %s' % - (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 %s' % + (anon_url(current_url), current_url.strip('/'))) or '')) + return '' provider = TorrentDayProvider()