Commit 38a0dd83 authored by echel0n's avatar echel0n
Browse files

Fixed issues with Torznab sending results to NZB client instead of Torrent client

parent 184a4c53
# Changelog # Changelog
- * 1f91427 - 2018-10-14: Release v9.3.88 - * 48a6d13 - 2018-10-15: Fixed issues with Torznab sending results to NZB client instead of Torrent client
- * b01ca47 - 2018-10-14: Release v9.3.88
- * 79735d7 - 2018-10-14: Fixed issue with custom provider not being saved when using spaces for names. Fixed parsing issue with Jackett. Fixed issue with missing provider icons. - * 79735d7 - 2018-10-14: Fixed issue with custom provider not being saved when using spaces for names. Fixed parsing issue with Jackett. Fixed issue with missing provider icons.
- * 6d8c60a - 2018-10-14: Fixed issue with custom providers having spaces in their names that was causing settings to not save - * 6d8c60a - 2018-10-14: Fixed issue with custom providers having spaces in their names that was causing settings to not save
- * 23f9684 - 2018-10-14: Fixed issues with removing custom torrent/newznab providers - * 23f9684 - 2018-10-14: Fixed issues with removing custom torrent/newznab providers
......
...@@ -60,9 +60,6 @@ def snatchEpisode(result, endStatus=SNATCHED): ...@@ -60,9 +60,6 @@ def snatchEpisode(result, endStatus=SNATCHED):
if re.search(r'(^|[. _-])(proper|repack)([. _-]|$)', result.name, re.I) is not None: if re.search(r'(^|[. _-])(proper|repack)([. _-]|$)', result.name, re.I) is not None:
endStatus = SNATCHED_PROPER endStatus = SNATCHED_PROPER
if result.url.startswith('magnet') or result.url.endswith('torrent'):
result.resultType = 'torrent'
# get result content # get result content
result.content = result.provider.get_content(result.url) result.content = result.provider.get_content(result.url)
...@@ -78,7 +75,7 @@ def snatchEpisode(result, endStatus=SNATCHED): ...@@ -78,7 +75,7 @@ def snatchEpisode(result, endStatus=SNATCHED):
else: else:
sickrage.app.log.error( sickrage.app.log.error(
"Unknown NZB action specified in config: " + sickrage.app.config.nzb_method) "Unknown NZB action specified in config: " + sickrage.app.config.nzb_method)
elif result.resultType == "torrent": elif result.resultType in ("torrent", "torznab"):
# add public trackers to torrent result # add public trackers to torrent result
if not result.provider.private: if not result.provider.private:
result = result.provider.add_trackers(result) result = result.provider.add_trackers(result)
......
...@@ -761,6 +761,7 @@ class NZBProvider(GenericProvider): ...@@ -761,6 +761,7 @@ class NZBProvider(GenericProvider):
super(NZBProvider, self).__init__(name, url, private) super(NZBProvider, self).__init__(name, url, private)
self.api_key = '' self.api_key = ''
self.username = '' self.username = ''
self.torznab = False
@property @property
def isActive(self): def isActive(self):
...@@ -775,6 +776,7 @@ class NZBProvider(GenericProvider): ...@@ -775,6 +776,7 @@ class NZBProvider(GenericProvider):
Returns a result of the correct type for this provider Returns a result of the correct type for this provider
""" """
result = NZBSearchResult(episodes) result = NZBSearchResult(episodes)
result.resultType = ('nzb', 'torznab')[self.torznab]
result.provider = self result.provider = self
return result return result
......
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