Merge branch 'refs/heads/develop' into desktop
This commit is contained in:
@@ -60,5 +60,11 @@ class Blackhole(Downloader):
|
|||||||
return ['nzb']
|
return ['nzb']
|
||||||
|
|
||||||
def isEnabled(self, manual, data = {}):
|
def isEnabled(self, manual, data = {}):
|
||||||
|
for_type = ['both']
|
||||||
|
if data and 'torrent' in data.get('type'):
|
||||||
|
for_type.append('torrent')
|
||||||
|
elif data:
|
||||||
|
for_type.append(data.get('type'))
|
||||||
|
|
||||||
return super(Blackhole, self).isEnabled(manual, data) and \
|
return super(Blackhole, self).isEnabled(manual, data) and \
|
||||||
((self.conf('use_for') in ['both', 'torrent' if 'torrent' in data.get('type') else data.get('type')]))
|
((self.conf('use_for') in for_type))
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from base64 import standard_b64encode
|
from base64 import standard_b64encode
|
||||||
from couchpotato.core.downloaders.base import Downloader
|
from couchpotato.core.downloaders.base import Downloader
|
||||||
|
from couchpotato.core.helpers.encoding import ss
|
||||||
from couchpotato.core.helpers.variable import tryInt
|
from couchpotato.core.helpers.variable import tryInt
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
import re
|
import re
|
||||||
@@ -24,7 +25,7 @@ class NZBGet(Downloader):
|
|||||||
log.info('Sending "%s" to NZBGet.', data.get('name'))
|
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'), 'password': self.conf('password')}
|
||||||
nzb_name = '%s.nzb' % self.createNzbName(data, movie)
|
nzb_name = ss('%s.nzb' % self.createNzbName(data, movie))
|
||||||
|
|
||||||
rpc = xmlrpclib.ServerProxy(url)
|
rpc = xmlrpclib.ServerProxy(url)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user