Not appending port to NZBGet host if it's blank

This helps when using reverse proxies, though it would be nice to have the option to set a web_root for something like this.
This commit is contained in:
Jonathan Putney 2016-08-02 15:43:04 -04:00 committed by evilhero
parent ab8a87b4ec
commit 538c2aece8
1 changed files with 4 additions and 1 deletions

View File

@ -2147,7 +2147,10 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
nzbcontent64 = standard_b64encode(nzbcontent)
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)
if str(mylar.NZBGET_PORT).strip() != '':
tmpapi += ":" + str(mylar.NZBGET_PORT)
tmpapi += "/xmlrpc"
server = ServerProxy(tmpapi)
send_to_nzbget = server.append(nzbpath, str(mylar.NZBGET_CATEGORY), int(nzbgetpriority), True, nzbcontent64)
sent_to = "NZBGet"