diff --git a/couchpotato/core/downloaders/blackhole/main.py b/couchpotato/core/downloaders/blackhole.py
similarity index 67%
rename from couchpotato/core/downloaders/blackhole/main.py
rename to couchpotato/core/downloaders/blackhole.py
index 9a018354..e58db5af 100644
--- a/couchpotato/core/downloaders/blackhole/main.py
+++ b/couchpotato/core/downloaders/blackhole.py
@@ -8,6 +8,8 @@ import traceback
log = CPLog(__name__)
+autoload = 'Blackhole'
+
class Blackhole(Downloader):
@@ -100,3 +102,54 @@ class Blackhole(Downloader):
return super(Blackhole, self).isEnabled(manual, data) and \
((self.conf('use_for') in for_protocol))
+
+
+config = [{
+ 'name': 'blackhole',
+ 'order': 30,
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'blackhole',
+ 'label': 'Black hole',
+ 'description': 'Download the NZB/Torrent to a specific folder. Note: Seeding and copying/linking features do not work with Black hole.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': True,
+ 'type': 'enabler',
+ 'radio_group': 'nzb,torrent',
+ },
+ {
+ 'name': 'directory',
+ 'type': 'directory',
+ 'description': 'Directory where the .nzb (or .torrent) file is saved to.',
+ 'default': getDownloadDir()
+ },
+ {
+ 'name': 'use_for',
+ 'label': 'Use for',
+ 'default': 'both',
+ 'type': 'dropdown',
+ 'values': [('usenet & torrents', 'both'), ('usenet', 'nzb'), ('torrent', 'torrent')],
+ },
+ {
+ 'name': 'create_subdir',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Create a sub directory when saving the .nzb (or .torrent).',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/blackhole/__init__.py b/couchpotato/core/downloaders/blackhole/__init__.py
deleted file mode 100644
index 92d18e7f..00000000
--- a/couchpotato/core/downloaders/blackhole/__init__.py
+++ /dev/null
@@ -1,56 +0,0 @@
-from .main import Blackhole
-from couchpotato.core.helpers.variable import getDownloadDir
-
-
-def start():
- return Blackhole()
-
-config = [{
- 'name': 'blackhole',
- 'order': 30,
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'blackhole',
- 'label': 'Black hole',
- 'description': 'Download the NZB/Torrent to a specific folder. Note: Seeding and copying/linking features do not work with Black hole.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': True,
- 'type': 'enabler',
- 'radio_group': 'nzb,torrent',
- },
- {
- 'name': 'directory',
- 'type': 'directory',
- 'description': 'Directory where the .nzb (or .torrent) file is saved to.',
- 'default': getDownloadDir()
- },
- {
- 'name': 'use_for',
- 'label': 'Use for',
- 'default': 'both',
- 'type': 'dropdown',
- 'values': [('usenet & torrents', 'both'), ('usenet', 'nzb'), ('torrent', 'torrent')],
- },
- {
- 'name': 'create_subdir',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Create a sub directory when saving the .nzb (or .torrent).',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/deluge/main.py b/couchpotato/core/downloaders/deluge.py
similarity index 77%
rename from couchpotato/core/downloaders/deluge/main.py
rename to couchpotato/core/downloaders/deluge.py
index 59300958..65e4aa92 100644
--- a/couchpotato/core/downloaders/deluge/main.py
+++ b/couchpotato/core/downloaders/deluge.py
@@ -13,6 +13,8 @@ import traceback
log = CPLog(__name__)
+autoload = 'Deluge'
+
class Deluge(Downloader):
@@ -291,3 +293,90 @@ class DelugeRPC(object):
return torrent_hash
return False
+
+
+config = [{
+ 'name': 'deluge',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'deluge',
+ 'label': 'Deluge',
+ 'description': 'Use Deluge to download torrents.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'torrent',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:58846',
+ 'description': 'Hostname with port. Usually localhost:58846',
+ },
+ {
+ 'name': 'username',
+ },
+ {
+ 'name': 'password',
+ 'type': 'password',
+ },
+ {
+ 'name': 'directory',
+ 'type': 'directory',
+ 'description': 'Download to this directory. Keep empty for default Deluge download directory.',
+ },
+ {
+ 'name': 'completed_directory',
+ 'type': 'directory',
+ 'description': 'Move completed torrent to this directory. Keep empty for default Deluge options.',
+ 'advanced': True,
+ },
+ {
+ 'name': 'label',
+ 'description': 'Label to add to torrents in the Deluge UI.',
+ },
+ {
+ 'name': 'remove_complete',
+ 'label': 'Remove torrent',
+ 'type': 'bool',
+ 'default': True,
+ 'advanced': True,
+ 'description': 'Remove the torrent from Deluge after it has finished seeding.',
+ },
+ {
+ 'name': 'delete_files',
+ 'label': 'Remove files',
+ 'default': True,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Also remove the leftover files.',
+ },
+ {
+ 'name': 'paused',
+ 'type': 'bool',
+ 'advanced': True,
+ 'default': False,
+ 'description': 'Add the torrent paused.',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ {
+ 'name': 'delete_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Delete a release after the download has failed.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/deluge/__init__.py b/couchpotato/core/downloaders/deluge/__init__.py
deleted file mode 100644
index 09fae751..00000000
--- a/couchpotato/core/downloaders/deluge/__init__.py
+++ /dev/null
@@ -1,91 +0,0 @@
-from .main import Deluge
-
-
-def start():
- return Deluge()
-
-config = [{
- 'name': 'deluge',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'deluge',
- 'label': 'Deluge',
- 'description': 'Use Deluge to download torrents.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'torrent',
- },
- {
- 'name': 'host',
- 'default': 'localhost:58846',
- 'description': 'Hostname with port. Usually localhost:58846',
- },
- {
- 'name': 'username',
- },
- {
- 'name': 'password',
- 'type': 'password',
- },
- {
- 'name': 'directory',
- 'type': 'directory',
- 'description': 'Download to this directory. Keep empty for default Deluge download directory.',
- },
- {
- 'name': 'completed_directory',
- 'type': 'directory',
- 'description': 'Move completed torrent to this directory. Keep empty for default Deluge options.',
- 'advanced': True,
- },
- {
- 'name': 'label',
- 'description': 'Label to add to torrents in the Deluge UI.',
- },
- {
- 'name': 'remove_complete',
- 'label': 'Remove torrent',
- 'type': 'bool',
- 'default': True,
- 'advanced': True,
- 'description': 'Remove the torrent from Deluge after it has finished seeding.',
- },
- {
- 'name': 'delete_files',
- 'label': 'Remove files',
- 'default': True,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Also remove the leftover files.',
- },
- {
- 'name': 'paused',
- 'type': 'bool',
- 'advanced': True,
- 'default': False,
- 'description': 'Add the torrent paused.',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- {
- 'name': 'delete_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Delete a release after the download has failed.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/nzbget/main.py b/couchpotato/core/downloaders/nzbget.py
similarity index 75%
rename from couchpotato/core/downloaders/nzbget/main.py
rename to couchpotato/core/downloaders/nzbget.py
index 3dad8670..743e2768 100644
--- a/couchpotato/core/downloaders/nzbget/main.py
+++ b/couchpotato/core/downloaders/nzbget.py
@@ -12,6 +12,8 @@ import xmlrpclib
log = CPLog(__name__)
+autoload = 'NZBGet'
+
class NZBGet(Downloader):
@@ -214,3 +216,76 @@ class NZBGet(Downloader):
def getRPC(self):
url = cleanHost(host = self.conf('host'), ssl = self.conf('ssl'), username = self.conf('username'), password = self.conf('password')) + self.rpc
return xmlrpclib.ServerProxy(url)
+
+
+config = [{
+ 'name': 'nzbget',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'nzbget',
+ 'label': 'NZBGet',
+ 'description': 'Use NZBGet to download NZBs.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'nzb',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:6789',
+ 'description': 'Hostname with port. Usually localhost:6789',
+ },
+ {
+ 'name': 'ssl',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Use HyperText Transfer Protocol Secure, or https',
+ },
+ {
+ 'name': 'username',
+ 'default': 'nzbget',
+ 'advanced': True,
+ 'description': 'Set a different username to connect. Default: nzbget',
+ },
+ {
+ 'name': 'password',
+ 'type': 'password',
+ 'description': 'Default NZBGet password is tegbzn6789',
+ },
+ {
+ 'name': 'category',
+ 'default': 'Movies',
+ 'description': 'The category CP places the nzb in. Like movies or couchpotato',
+ },
+ {
+ 'name': 'priority',
+ 'advanced': True,
+ 'default': '0',
+ 'type': 'dropdown',
+ 'values': [('Very Low', -100), ('Low', -50), ('Normal', 0), ('High', 50), ('Very High', 100)],
+ 'description': 'Only change this if you are using NZBget 9.0 or higher',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ {
+ 'name': 'delete_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Delete a release after the download has failed.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/nzbget/__init__.py b/couchpotato/core/downloaders/nzbget/__init__.py
deleted file mode 100644
index 551eb42c..00000000
--- a/couchpotato/core/downloaders/nzbget/__init__.py
+++ /dev/null
@@ -1,77 +0,0 @@
-from .main import NZBGet
-
-
-def start():
- return NZBGet()
-
-config = [{
- 'name': 'nzbget',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'nzbget',
- 'label': 'NZBGet',
- 'description': 'Use NZBGet to download NZBs.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'nzb',
- },
- {
- 'name': 'host',
- 'default': 'localhost:6789',
- 'description': 'Hostname with port. Usually localhost:6789',
- },
- {
- 'name': 'ssl',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Use HyperText Transfer Protocol Secure, or https',
- },
- {
- 'name': 'username',
- 'default': 'nzbget',
- 'advanced': True,
- 'description': 'Set a different username to connect. Default: nzbget',
- },
- {
- 'name': 'password',
- 'type': 'password',
- 'description': 'Default NZBGet password is tegbzn6789',
- },
- {
- 'name': 'category',
- 'default': 'Movies',
- 'description': 'The category CP places the nzb in. Like movies or couchpotato',
- },
- {
- 'name': 'priority',
- 'advanced': True,
- 'default': '0',
- 'type': 'dropdown',
- 'values': [('Very Low', -100), ('Low', -50), ('Normal', 0), ('High', 50), ('Very High', 100)],
- 'description': 'Only change this if you are using NZBget 9.0 or higher',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- {
- 'name': 'delete_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Delete a release after the download has failed.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/nzbvortex/main.py b/couchpotato/core/downloaders/nzbvortex.py
similarity index 76%
rename from couchpotato/core/downloaders/nzbvortex/main.py
rename to couchpotato/core/downloaders/nzbvortex.py
index d1525c89..1084e668 100644
--- a/couchpotato/core/downloaders/nzbvortex/main.py
+++ b/couchpotato/core/downloaders/nzbvortex.py
@@ -18,6 +18,8 @@ import urllib2
log = CPLog(__name__)
+autoload = 'NZBVortex'
+
class NZBVortex(Downloader):
@@ -186,3 +188,56 @@ class HTTPSConnection(httplib.HTTPSConnection):
class HTTPSHandler(urllib2.HTTPSHandler):
def https_open(self, req):
return self.do_open(HTTPSConnection, req)
+
+
+config = [{
+ 'name': 'nzbvortex',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'nzbvortex',
+ 'label': 'NZBVortex',
+ 'description': 'Use NZBVortex to download NZBs.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'nzb',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:4321',
+ 'description': 'Hostname with port. Usually localhost:4321',
+ },
+ {
+ 'name': 'ssl',
+ 'default': 1,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Use HyperText Transfer Protocol Secure, or https',
+ },
+ {
+ 'name': 'api_key',
+ 'label': 'Api Key',
+ },
+ {
+ 'name': 'manual',
+ 'default': False,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ {
+ 'name': 'delete_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Delete a release after the download has failed.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/nzbvortex/__init__.py b/couchpotato/core/downloaders/nzbvortex/__init__.py
deleted file mode 100644
index 1c2d699e..00000000
--- a/couchpotato/core/downloaders/nzbvortex/__init__.py
+++ /dev/null
@@ -1,57 +0,0 @@
-from .main import NZBVortex
-
-
-def start():
- return NZBVortex()
-
-config = [{
- 'name': 'nzbvortex',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'nzbvortex',
- 'label': 'NZBVortex',
- 'description': 'Use NZBVortex to download NZBs.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'nzb',
- },
- {
- 'name': 'host',
- 'default': 'localhost:4321',
- 'description': 'Hostname with port. Usually localhost:4321',
- },
- {
- 'name': 'ssl',
- 'default': 1,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Use HyperText Transfer Protocol Secure, or https',
- },
- {
- 'name': 'api_key',
- 'label': 'Api Key',
- },
- {
- 'name': 'manual',
- 'default': False,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- {
- 'name': 'delete_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Delete a release after the download has failed.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/pneumatic/main.py b/couchpotato/core/downloaders/pneumatic.py
similarity index 69%
rename from couchpotato/core/downloaders/pneumatic/main.py
rename to couchpotato/core/downloaders/pneumatic.py
index bc1f6d04..823cd388 100644
--- a/couchpotato/core/downloaders/pneumatic/main.py
+++ b/couchpotato/core/downloaders/pneumatic.py
@@ -7,6 +7,8 @@ import traceback
log = CPLog(__name__)
+autoload = 'Pneumatic'
+
class Pneumatic(Downloader):
@@ -71,3 +73,37 @@ class Pneumatic(Downloader):
return True
return False
+
+
+config = [{
+ 'name': 'pneumatic',
+ 'order': 30,
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'pneumatic',
+ 'label': 'Pneumatic',
+ 'description': 'Use Pneumatic to download .strm files.',
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ },
+ {
+ 'name': 'directory',
+ 'type': 'directory',
+ 'description': 'Directory where the .strm file is saved to.',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/pneumatic/__init__.py b/couchpotato/core/downloaders/pneumatic/__init__.py
deleted file mode 100644
index 698643fb..00000000
--- a/couchpotato/core/downloaders/pneumatic/__init__.py
+++ /dev/null
@@ -1,38 +0,0 @@
-from .main import Pneumatic
-
-
-def start():
- return Pneumatic()
-
-config = [{
- 'name': 'pneumatic',
- 'order': 30,
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'pneumatic',
- 'label': 'Pneumatic',
- 'description': 'Use Pneumatic to download .strm files.',
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- },
- {
- 'name': 'directory',
- 'type': 'directory',
- 'description': 'Directory where the .strm file is saved to.',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/rtorrent/main.py b/couchpotato/core/downloaders/rtorrent.py
old mode 100755
new mode 100644
similarity index 74%
rename from couchpotato/core/downloaders/rtorrent/main.py
rename to couchpotato/core/downloaders/rtorrent.py
index 79ab9482..e2936ca5
--- a/couchpotato/core/downloaders/rtorrent/main.py
+++ b/couchpotato/core/downloaders/rtorrent.py
@@ -15,6 +15,8 @@ from scandir import scandir
log = CPLog(__name__)
+autoload = 'rTorrent'
+
class rTorrent(Downloader):
@@ -291,3 +293,92 @@ class rTorrent(Downloader):
torrent.erase() # just removes the torrent, doesn't delete data
return True
+
+
+config = [{
+ 'name': 'rtorrent',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'rtorrent',
+ 'label': 'rTorrent',
+ 'description': '',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'torrent',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:80',
+ 'description': 'RPC Communication URI. Usually scgi://localhost:5000, '
+ 'httprpc://localhost/rutorrent or localhost:80'
+ },
+ {
+ 'name': 'ssl',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Use HyperText Transfer Protocol Secure, or https',
+ },
+ {
+ 'name': 'rpc_url',
+ 'type': 'string',
+ 'default': 'RPC2',
+ 'advanced': True,
+ 'description': 'Change if your RPC mount is at a different path.',
+ },
+ {
+ 'name': 'username',
+ },
+ {
+ 'name': 'password',
+ 'type': 'password',
+ },
+ {
+ 'name': 'label',
+ 'description': 'Label to apply on added torrents.',
+ },
+ {
+ 'name': 'directory',
+ 'type': 'directory',
+ 'description': 'Download to this directory. Keep empty for default rTorrent download directory.',
+ },
+ {
+ 'name': 'remove_complete',
+ 'label': 'Remove torrent',
+ 'default': False,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Remove the torrent after it finishes seeding.',
+ },
+ {
+ 'name': 'delete_files',
+ 'label': 'Remove files',
+ 'default': True,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Also remove the leftover files.',
+ },
+ {
+ 'name': 'paused',
+ 'type': 'bool',
+ 'advanced': True,
+ 'default': False,
+ 'description': 'Add the torrent paused.',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/rtorrent/__init__.py b/couchpotato/core/downloaders/rtorrent/__init__.py
deleted file mode 100755
index f793cad1..00000000
--- a/couchpotato/core/downloaders/rtorrent/__init__.py
+++ /dev/null
@@ -1,100 +0,0 @@
-from .main import rTorrent
-
-
-def start():
- return rTorrent()
-
-config = [{
- 'name': 'rtorrent',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'rtorrent',
- 'label': 'rTorrent',
- 'description': '',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'torrent',
- },
-# @RuudBurger: How do I migrate this?
-# {
-# 'name': 'url',
-# 'default': 'http://localhost:80/RPC2',
-# 'description': 'XML-RPC Endpoint URI. Usually scgi://localhost:5000 '
-# 'or http://localhost:80/RPC2'
-# },
- {
- 'name': 'host',
- 'default': 'localhost:80',
- 'description': 'RPC Communication URI. Usually scgi://localhost:5000, '
- 'httprpc://localhost/rutorrent or localhost:80'
- },
- {
- 'name': 'ssl',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Use HyperText Transfer Protocol Secure, or https',
- },
- {
- 'name': 'rpc_url',
- 'type': 'string',
- 'default': 'RPC2',
- 'advanced': True,
- 'description': 'Change if your RPC mount is at a different path.',
- },
- {
- 'name': 'username',
- },
- {
- 'name': 'password',
- 'type': 'password',
- },
- {
- 'name': 'label',
- 'description': 'Label to apply on added torrents.',
- },
- {
- 'name': 'directory',
- 'type': 'directory',
- 'description': 'Download to this directory. Keep empty for default rTorrent download directory.',
- },
- {
- 'name': 'remove_complete',
- 'label': 'Remove torrent',
- 'default': False,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Remove the torrent after it finishes seeding.',
- },
- {
- 'name': 'delete_files',
- 'label': 'Remove files',
- 'default': True,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Also remove the leftover files.',
- },
- {
- 'name': 'paused',
- 'type': 'bool',
- 'advanced': True,
- 'default': False,
- 'description': 'Add the torrent paused.',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/sabnzbd/main.py b/couchpotato/core/downloaders/sabnzbd.py
similarity index 71%
rename from couchpotato/core/downloaders/sabnzbd/main.py
rename to couchpotato/core/downloaders/sabnzbd.py
index ba58c090..33e51fa7 100644
--- a/couchpotato/core/downloaders/sabnzbd/main.py
+++ b/couchpotato/core/downloaders/sabnzbd.py
@@ -11,6 +11,8 @@ import traceback
log = CPLog(__name__)
+autoload = 'Sabnzbd'
+
class Sabnzbd(Downloader):
@@ -201,3 +203,77 @@ class Sabnzbd(Downloader):
else:
return data
+
+config = [{
+ 'name': 'sabnzbd',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'sabnzbd',
+ 'label': 'Sabnzbd',
+ 'description': 'Use SABnzbd (0.7+) to download NZBs.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'nzb',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:8080',
+ },
+ {
+ 'name': 'ssl',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Use HyperText Transfer Protocol Secure, or https',
+ },
+ {
+ 'name': 'api_key',
+ 'label': 'Api Key',
+ 'description': 'Used for all calls to Sabnzbd.',
+ },
+ {
+ 'name': 'category',
+ 'label': 'Category',
+ 'description': 'The category CP places the nzb in. Like movies or couchpotato',
+ },
+ {
+ 'name': 'priority',
+ 'label': 'Priority',
+ 'type': 'dropdown',
+ 'default': '0',
+ 'advanced': True,
+ 'values': [('Paused', -2), ('Low', -1), ('Normal', 0), ('High', 1), ('Forced', 2)],
+ 'description': 'Add to the queue with this priority.',
+ },
+ {
+ 'name': 'manual',
+ 'default': False,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ {
+ 'name': 'remove_complete',
+ 'advanced': True,
+ 'label': 'Remove NZB',
+ 'default': False,
+ 'type': 'bool',
+ 'description': 'Remove the NZB from history after it completed.',
+ },
+ {
+ 'name': 'delete_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Delete a release after the download has failed.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/sabnzbd/__init__.py b/couchpotato/core/downloaders/sabnzbd/__init__.py
deleted file mode 100644
index 2990078a..00000000
--- a/couchpotato/core/downloaders/sabnzbd/__init__.py
+++ /dev/null
@@ -1,79 +0,0 @@
-from .main import Sabnzbd
-
-
-def start():
- return Sabnzbd()
-
-config = [{
- 'name': 'sabnzbd',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'sabnzbd',
- 'label': 'Sabnzbd',
- 'description': 'Use SABnzbd (0.7+) to download NZBs.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'nzb',
- },
- {
- 'name': 'host',
- 'default': 'localhost:8080',
- },
- {
- 'name': 'ssl',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Use HyperText Transfer Protocol Secure, or https',
- },
- {
- 'name': 'api_key',
- 'label': 'Api Key',
- 'description': 'Used for all calls to Sabnzbd.',
- },
- {
- 'name': 'category',
- 'label': 'Category',
- 'description': 'The category CP places the nzb in. Like movies or couchpotato',
- },
- {
- 'name': 'priority',
- 'label': 'Priority',
- 'type': 'dropdown',
- 'default': '0',
- 'advanced': True,
- 'values': [('Paused', -2), ('Low', -1), ('Normal', 0), ('High', 1), ('Forced', 2)],
- 'description': 'Add to the queue with this priority.',
- },
- {
- 'name': 'manual',
- 'default': False,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- {
- 'name': 'remove_complete',
- 'advanced': True,
- 'label': 'Remove NZB',
- 'default': False,
- 'type': 'bool',
- 'description': 'Remove the NZB from history after it completed.',
- },
- {
- 'name': 'delete_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Delete a release after the download has failed.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/synology/main.py b/couchpotato/core/downloaders/synology.py
similarity index 78%
rename from couchpotato/core/downloaders/synology/main.py
rename to couchpotato/core/downloaders/synology.py
index 7e5b6098..edc732a2 100644
--- a/couchpotato/core/downloaders/synology/main.py
+++ b/couchpotato/core/downloaders/synology.py
@@ -8,6 +8,8 @@ import traceback
log = CPLog(__name__)
+autoload = 'Synology'
+
class Synology(Downloader):
@@ -160,3 +162,52 @@ class SynologyRPC(object):
def test(self):
return bool(self._login())
+
+
+config = [{
+ 'name': 'synology',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'synology',
+ 'label': 'Synology',
+ 'description': 'Use Synology Download Station to download.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'nzb,torrent',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:5000',
+ 'description': 'Hostname with port. Usually localhost:5000',
+ },
+ {
+ 'name': 'username',
+ },
+ {
+ 'name': 'password',
+ 'type': 'password',
+ },
+ {
+ 'name': 'use_for',
+ 'label': 'Use for',
+ 'default': 'both',
+ 'type': 'dropdown',
+ 'values': [('usenet & torrents', 'both'), ('usenet', 'nzb'), ('torrent', 'torrent')],
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/synology/__init__.py b/couchpotato/core/downloaders/synology/__init__.py
deleted file mode 100644
index d0c57c2f..00000000
--- a/couchpotato/core/downloaders/synology/__init__.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from .main import Synology
-
-
-def start():
- return Synology()
-
-config = [{
- 'name': 'synology',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'synology',
- 'label': 'Synology',
- 'description': 'Use Synology Download Station to download.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'nzb,torrent',
- },
- {
- 'name': 'host',
- 'default': 'localhost:5000',
- 'description': 'Hostname with port. Usually localhost:5000',
- },
- {
- 'name': 'username',
- },
- {
- 'name': 'password',
- 'type': 'password',
- },
- {
- 'name': 'use_for',
- 'label': 'Use for',
- 'default': 'both',
- 'type': 'dropdown',
- 'values': [('usenet & torrents', 'both'), ('usenet', 'nzb'), ('torrent', 'torrent')],
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/transmission/main.py b/couchpotato/core/downloaders/transmission.py
similarity index 76%
rename from couchpotato/core/downloaders/transmission/main.py
rename to couchpotato/core/downloaders/transmission.py
index 4c42bf0f..a9567805 100644
--- a/couchpotato/core/downloaders/transmission/main.py
+++ b/couchpotato/core/downloaders/transmission.py
@@ -12,6 +12,8 @@ import urllib2
log = CPLog(__name__)
+autoload = 'Transmission'
+
class Transmission(Downloader):
@@ -251,3 +253,93 @@ class TransmissionRPC(object):
post_data = {'arguments': {'ids': torrent_id, 'delete-local-data': delete_local_data}, 'method': 'torrent-remove', 'tag': self.tag}
return self._request(post_data)
+
+config = [{
+ 'name': 'transmission',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'transmission',
+ 'label': 'Transmission',
+ 'description': 'Use Transmission to download torrents.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'torrent',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:9091',
+ 'description': 'Hostname with port. Usually localhost:9091',
+ },
+ {
+ 'name': 'rpc_url',
+ 'type': 'string',
+ 'default': 'transmission',
+ 'advanced': True,
+ 'description': 'Change if you don\'t run Transmission RPC at the default url.',
+ },
+ {
+ 'name': 'username',
+ },
+ {
+ 'name': 'password',
+ 'type': 'password',
+ },
+ {
+ 'name': 'directory',
+ 'type': 'directory',
+ 'description': 'Download to this directory. Keep empty for default Transmission download directory.',
+ },
+ {
+ 'name': 'remove_complete',
+ 'label': 'Remove torrent',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Remove the torrent from Transmission after it finished seeding.',
+ },
+ {
+ 'name': 'delete_files',
+ 'label': 'Remove files',
+ 'default': True,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Also remove the leftover files.',
+ },
+ {
+ 'name': 'paused',
+ 'type': 'bool',
+ 'advanced': True,
+ 'default': False,
+ 'description': 'Add the torrent paused.',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ {
+ 'name': 'stalled_as_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Consider a stalled torrent as failed',
+ },
+ {
+ 'name': 'delete_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Delete a release after the download has failed.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/transmission/__init__.py b/couchpotato/core/downloaders/transmission/__init__.py
deleted file mode 100644
index 4c9b4aad..00000000
--- a/couchpotato/core/downloaders/transmission/__init__.py
+++ /dev/null
@@ -1,95 +0,0 @@
-from .main import Transmission
-
-
-def start():
- return Transmission()
-
-config = [{
- 'name': 'transmission',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'transmission',
- 'label': 'Transmission',
- 'description': 'Use Transmission to download torrents.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'torrent',
- },
- {
- 'name': 'host',
- 'default': 'localhost:9091',
- 'description': 'Hostname with port. Usually localhost:9091',
- },
- {
- 'name': 'rpc_url',
- 'type': 'string',
- 'default': 'transmission',
- 'advanced': True,
- 'description': 'Change if you don\'t run Transmission RPC at the default url.',
- },
- {
- 'name': 'username',
- },
- {
- 'name': 'password',
- 'type': 'password',
- },
- {
- 'name': 'directory',
- 'type': 'directory',
- 'description': 'Download to this directory. Keep empty for default Transmission download directory.',
- },
- {
- 'name': 'remove_complete',
- 'label': 'Remove torrent',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Remove the torrent from Transmission after it finished seeding.',
- },
- {
- 'name': 'delete_files',
- 'label': 'Remove files',
- 'default': True,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Also remove the leftover files.',
- },
- {
- 'name': 'paused',
- 'type': 'bool',
- 'advanced': True,
- 'default': False,
- 'description': 'Add the torrent paused.',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- {
- 'name': 'stalled_as_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Consider a stalled torrent as failed',
- },
- {
- 'name': 'delete_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Delete a release after the download has failed.',
- },
- ],
- }
- ],
-}]
diff --git a/couchpotato/core/downloaders/utorrent/main.py b/couchpotato/core/downloaders/utorrent.py
similarity index 83%
rename from couchpotato/core/downloaders/utorrent/main.py
rename to couchpotato/core/downloaders/utorrent.py
index 6a5e4257..345b17e5 100644
--- a/couchpotato/core/downloaders/utorrent/main.py
+++ b/couchpotato/core/downloaders/utorrent.py
@@ -19,6 +19,8 @@ import urllib2
log = CPLog(__name__)
+autoload = 'uTorrent'
+
class uTorrent(Downloader):
@@ -340,3 +342,79 @@ class uTorrentAPI(object):
return False
response = json.loads(data)
return int(response.get('build'))
+
+
+config = [{
+ 'name': 'utorrent',
+ 'groups': [
+ {
+ 'tab': 'downloaders',
+ 'list': 'download_providers',
+ 'name': 'utorrent',
+ 'label': 'uTorrent',
+ 'description': 'Use uTorrent (3.0+) to download torrents.',
+ 'wizard': True,
+ 'options': [
+ {
+ 'name': 'enabled',
+ 'default': 0,
+ 'type': 'enabler',
+ 'radio_group': 'torrent',
+ },
+ {
+ 'name': 'host',
+ 'default': 'localhost:8000',
+ 'description': 'Port can be found in settings when enabling WebUI.',
+ },
+ {
+ 'name': 'username',
+ },
+ {
+ 'name': 'password',
+ 'type': 'password',
+ },
+ {
+ 'name': 'label',
+ 'description': 'Label to add torrent as.',
+ },
+ {
+ 'name': 'remove_complete',
+ 'label': 'Remove torrent',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Remove the torrent from uTorrent after it finished seeding.',
+ },
+ {
+ 'name': 'delete_files',
+ 'label': 'Remove files',
+ 'default': True,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Also remove the leftover files.',
+ },
+ {
+ 'name': 'paused',
+ 'type': 'bool',
+ 'advanced': True,
+ 'default': False,
+ 'description': 'Add the torrent paused.',
+ },
+ {
+ 'name': 'manual',
+ 'default': 0,
+ 'type': 'bool',
+ 'advanced': True,
+ 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
+ },
+ {
+ 'name': 'delete_failed',
+ 'default': True,
+ 'advanced': True,
+ 'type': 'bool',
+ 'description': 'Delete a release after the download has failed.',
+ },
+ ],
+ }
+ ],
+}]
diff --git a/couchpotato/core/downloaders/utorrent/__init__.py b/couchpotato/core/downloaders/utorrent/__init__.py
deleted file mode 100644
index da160956..00000000
--- a/couchpotato/core/downloaders/utorrent/__init__.py
+++ /dev/null
@@ -1,80 +0,0 @@
-from .main import uTorrent
-
-
-def start():
- return uTorrent()
-
-config = [{
- 'name': 'utorrent',
- 'groups': [
- {
- 'tab': 'downloaders',
- 'list': 'download_providers',
- 'name': 'utorrent',
- 'label': 'uTorrent',
- 'description': 'Use uTorrent (3.0+) to download torrents.',
- 'wizard': True,
- 'options': [
- {
- 'name': 'enabled',
- 'default': 0,
- 'type': 'enabler',
- 'radio_group': 'torrent',
- },
- {
- 'name': 'host',
- 'default': 'localhost:8000',
- 'description': 'Port can be found in settings when enabling WebUI.',
- },
- {
- 'name': 'username',
- },
- {
- 'name': 'password',
- 'type': 'password',
- },
- {
- 'name': 'label',
- 'description': 'Label to add torrent as.',
- },
- {
- 'name': 'remove_complete',
- 'label': 'Remove torrent',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Remove the torrent from uTorrent after it finished seeding.',
- },
- {
- 'name': 'delete_files',
- 'label': 'Remove files',
- 'default': True,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Also remove the leftover files.',
- },
- {
- 'name': 'paused',
- 'type': 'bool',
- 'advanced': True,
- 'default': False,
- 'description': 'Add the torrent paused.',
- },
- {
- 'name': 'manual',
- 'default': 0,
- 'type': 'bool',
- 'advanced': True,
- 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
- },
- {
- 'name': 'delete_failed',
- 'default': True,
- 'advanced': True,
- 'type': 'bool',
- 'description': 'Delete a release after the download has failed.',
- },
- ],
- }
- ],
-}]