Commit ecb16002 authored by echel0n's avatar echel0n
Browse files

Fixed setting caps issue when searching newznab providers

parent bbbc6cbe
# Changelog
- * 4c87e58 - 2018-10-17: Fixed 'Notification' object has no attribute 'type' issue.
- * c2532ce - 2018-10-17: Fixed setting caps issue when searching newznab providers
- * bbbc6cb - 2018-10-17: Fixed 'Notification' object has no attribute 'type' issue.
- * aad016d - 2018-10-16: Release v9.3.95
- * 0f07f4b - 2018-10-16: Fixed issue with checking for stash in output of git cmds Disabled creating docker tags for develop branch
- * 8b3319d - 2018-10-15: Release v9.3.94
......
......@@ -1003,15 +1003,12 @@ class NewznabProvider(NZBProvider):
def _parse_cap(tag):
elm = data.find(tag)
return elm.get('supportedparams', 'True') if elm and elm.get('available') else ''
is_supported = elm and all([elm.get('supportedparams'), elm.get('available') == 'yes'])
return elm['supportedparams'].split(',') if is_supported else []
self.cap_tv_search = _parse_cap('tv-search')
# self.cap_search = _parse_cap('search')
# self.cap_movie_search = _parse_cap('movie-search')
# self.cap_audio_search = _parse_cap('audio-search')
# self.caps = any([self.cap_tv_search, self.cap_search, self.cap_movie_search, self.cap_audio_search])
self.caps = any([self.cap_tv_search])
self.caps = any(self.cap_tv_search)
def get_newznab_categories(self, just_caps=False):
"""
......@@ -1100,8 +1097,6 @@ class NewznabProvider(NZBProvider):
# For providers that don't have caps, or for which the t=caps is not working.
if not self.caps:
self.get_newznab_categories(just_caps=True)
if not self.caps:
return results
for mode in search_strings:
self.torznab = False
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment