Blackhole dropdown

This commit is contained in:
Ruud
2011-10-01 20:56:46 +02:00
parent 5cca9333af
commit 4757651f7f
5 changed files with 12 additions and 1 deletions
@@ -16,12 +16,20 @@ config = [{
'name': 'enabled',
'default': 0,
'type': 'enabler',
'radio_group': 'nzb,torrent',
},
{
'name': 'directory',
'type': 'directory',
'description': 'Directory where the .nzb (or .torrent) file is saved to.',
},
{
'name': 'use_for',
'label': 'Use for',
'default': 'both',
'type': 'dropdown',
'values': [('nzbs & torrents', 'both'), ('nzb', 'nzb'), ('torrent', 'torrent')],
},
],
}
],
@@ -12,7 +12,7 @@ class Blackhole(Downloader):
def download(self, data = {}, movie = {}):
if self.isDisabled() or not self.isCorrectType(data.get('type')):
if self.isDisabled() or not self.isCorrectType(data.get('type') or not self.conf('use_for') in ['both', data.get('type')]):
return
directory = self.conf('directory')
@@ -16,6 +16,7 @@ config = [{
'name': 'enabled',
'default': 0,
'type': 'enabler',
'radio_group': 'nzb',
},
{
'name': 'host',
@@ -16,6 +16,7 @@ config = [{
'name': 'enabled',
'default': 0,
'type': 'enabler',
'radio_group': 'nzb',
},
{
'name': 'host',
@@ -16,6 +16,7 @@ config = [{
'name': 'enabled',
'default': 0,
'type': 'enabler',
'radio_group': 'torrent',
},
{
'name': 'host',