mirror of
https://github.com/evilhero/mylar
synced 2024-12-26 09:36:53 +00:00
FIX:(#886) some nzb providers would have the nzb url double url-encoded, resulting in empty nzb files being retrieved.
This commit is contained in:
parent
860b4d8ea8
commit
67ce6f80d7
1 changed files with 8 additions and 8 deletions
|
@ -1664,13 +1664,15 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
||||||
linkstart = os.path.splitext(link)[0]
|
linkstart = os.path.splitext(link)[0]
|
||||||
if nzbprov == 'nzb.su' or nzbprov == 'newznab':
|
if nzbprov == 'nzb.su' or nzbprov == 'newznab':
|
||||||
linkit = os.path.splitext(link)[1]
|
linkit = os.path.splitext(link)[1]
|
||||||
if mylar.USE_SABNZBD:
|
#if mylar.USE_SABNZBD:
|
||||||
linkit = linkit.replace("&", "%26")
|
# linkit = linkit.replace("&", "%26")
|
||||||
linkapi = str(linkstart) + str(linkit)
|
linkapi = linkstart + linkit
|
||||||
else:
|
else:
|
||||||
# this should work for every other provider
|
# this should work for every other provider
|
||||||
linkstart = linkstart.replace("&", "%26")
|
#linkstart = linkstart.replace("&", "%26")
|
||||||
linkapi = str(linkstart)
|
linkapi = linkstart
|
||||||
|
|
||||||
|
fileURL = urllib.quote_plus(linkapi)
|
||||||
logger.fdebug("link given by: " + str(nzbprov))
|
logger.fdebug("link given by: " + str(nzbprov))
|
||||||
#logger.fdebug("link: " + str(linkstart))
|
#logger.fdebug("link: " + str(linkstart))
|
||||||
#logger.fdebug("linkforapi: " + str(linkapi))
|
#logger.fdebug("linkforapi: " + str(linkapi))
|
||||||
|
@ -1750,7 +1752,7 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
||||||
tmpapi = str(tmpapi) + str(mylar.NZBGET_USERNAME) + ":" + str(mylar.NZBGET_PASSWORD)
|
tmpapi = str(tmpapi) + str(mylar.NZBGET_USERNAME) + ":" + str(mylar.NZBGET_PASSWORD)
|
||||||
tmpapi = str(tmpapi) + "@" + str(nzbget_host) + ":" + str(mylar.NZBGET_PORT) + "/xmlrpc"
|
tmpapi = str(tmpapi) + "@" + str(nzbget_host) + ":" + str(mylar.NZBGET_PORT) + "/xmlrpc"
|
||||||
server = ServerProxy(tmpapi)
|
server = ServerProxy(tmpapi)
|
||||||
send_to_nzbget = server.appendurl(nzbname + ".nzb", str(mylar.NZBGET_CATEGORY), int(nzbgetpriority), True, urllib.quote_plus(linkapi))
|
send_to_nzbget = server.appendurl(nzbname + ".nzb", str(mylar.NZBGET_CATEGORY), int(nzbgetpriority), True, fileURL)
|
||||||
sent_to = "NZBGet"
|
sent_to = "NZBGet"
|
||||||
if send_to_nzbget is True:
|
if send_to_nzbget is True:
|
||||||
logger.info("Successfully sent nzb to NZBGet!")
|
logger.info("Successfully sent nzb to NZBGet!")
|
||||||
|
@ -1766,8 +1768,6 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
||||||
|
|
||||||
logger.fdebug("send-to-SAB host &api initiation string : " + str(helpers.apiremove(tmpapi,'&')))
|
logger.fdebug("send-to-SAB host &api initiation string : " + str(helpers.apiremove(tmpapi,'&')))
|
||||||
|
|
||||||
fileURL = urllib.quote_plus(linkapi)
|
|
||||||
|
|
||||||
SABtype = "&mode=addurl&name="
|
SABtype = "&mode=addurl&name="
|
||||||
tmpapi = tmpapi + SABtype
|
tmpapi = tmpapi + SABtype
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue