Add username to nzbget downloader

For raspberry pi a different username than normal is required. Fixes
#1652
This commit is contained in:
mano3m
2013-04-24 22:19:34 +02:00
parent 0e90739786
commit 1022753213
2 changed files with 7 additions and 3 deletions

View File

@@ -24,6 +24,10 @@ config = [{
'default': 'localhost:6789',
'description': 'Hostname with port. Usually <strong>localhost:6789</strong>',
},
{
'name': 'username',
'default': 'nzbget',
},
{
'name': 'password',
'type': 'password',

View File

@@ -16,7 +16,7 @@ class NZBGet(Downloader):
type = ['nzb']
url = 'http://nzbget:%(password)s@%(host)s/xmlrpc'
url = 'http://%(username):%(password)s@%(host)s/xmlrpc'
def download(self, data = {}, movie = {}, filedata = None):
@@ -26,7 +26,7 @@ class NZBGet(Downloader):
log.info('Sending "%s" to NZBGet.', data.get('name'))
url = self.url % {'host': self.conf('host'), 'password': self.conf('password')}
url = self.url % {'host': self.conf('host'), 'username': self.conf('username'), 'password': self.conf('password')}
nzb_name = ss('%s.nzb' % self.createNzbName(data, movie))
rpc = xmlrpclib.ServerProxy(url)
@@ -61,7 +61,7 @@ class NZBGet(Downloader):
log.debug('Checking NZBGet download status.')
url = self.url % {'host': self.conf('host'), 'password': self.conf('password')}
url = self.url % {'host': self.conf('host'), 'username': self.conf('username'), 'password': self.conf('password')}
rpc = xmlrpclib.ServerProxy(url)
try: