Merge pull request #727 from JackDandy/feature/ChangeNG

Change send nzb data to NZBGet for Anizb instead of url.
This commit is contained in:
JackDandy 2016-07-03 00:43:57 +01:00 committed by GitHub
commit b02b8a1cb7
2 changed files with 9 additions and 0 deletions

View file

@ -103,6 +103,9 @@
* Change use full first aired date where available in "Add New Show" results
* Change prevent duplicate results in "Add New Show"
[develop changelog]
* Change send nzb data to NZBGet for Anizb instead of url
### 0.11.12 (2016-06-20 02:20:00 UTC)

View file

@ -90,6 +90,12 @@ def sendNZB(nzb, proper=False):
if nzb.resultType == "nzbdata":
data = nzb.extraInfo[0]
nzbcontent64 = standard_b64encode(data)
elif 'Anizb' == nzb.provider.name and 'nzb' == nzb.resultType:
gen_provider = GenericProvider('')
data = gen_provider.get_url(nzb.url)
if None is data:
return False
nzbcontent64 = standard_b64encode(data)
logger.log(u"Sending NZB to NZBGet: %s" % nzb.name)
logger.log(u"NZBGet URL: " + url, logger.DEBUG)