From 96a39dbf607f2537160daa5d9e24a4e1a344f0a3 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 2 Jan 2013 13:52:44 +0100 Subject: [PATCH 1/4] Link to downloaders --- couchpotato/core/downloaders/nzbget/__init__.py | 2 +- couchpotato/core/downloaders/nzbvortex/__init__.py | 2 +- couchpotato/core/downloaders/pneumatic/__init__.py | 2 +- couchpotato/core/downloaders/sabnzbd/__init__.py | 2 +- couchpotato/core/downloaders/synology/__init__.py | 2 +- couchpotato/core/downloaders/transmission/__init__.py | 2 +- couchpotato/core/downloaders/utorrent/__init__.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/couchpotato/core/downloaders/nzbget/__init__.py b/couchpotato/core/downloaders/nzbget/__init__.py index 10994299..4f5afb36 100644 --- a/couchpotato/core/downloaders/nzbget/__init__.py +++ b/couchpotato/core/downloaders/nzbget/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'downloaders', 'name': 'nzbget', 'label': 'NZBGet', - 'description': 'Send NZBs to your NZBGet installation.', + 'description': 'Use NZBGet to download NZBs.', 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/downloaders/nzbvortex/__init__.py b/couchpotato/core/downloaders/nzbvortex/__init__.py index d79983f4..ce9c8587 100644 --- a/couchpotato/core/downloaders/nzbvortex/__init__.py +++ b/couchpotato/core/downloaders/nzbvortex/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'downloaders', 'name': 'nzbvortex', 'label': 'NZBVortex', - 'description': 'Send NZBs to your NZBVortex app.', + 'description': 'Use NZBVortex to download NZBs.', 'wizard': True, 'options': [ { diff --git a/couchpotato/core/downloaders/pneumatic/__init__.py b/couchpotato/core/downloaders/pneumatic/__init__.py index 004821c5..f119cfc5 100644 --- a/couchpotato/core/downloaders/pneumatic/__init__.py +++ b/couchpotato/core/downloaders/pneumatic/__init__.py @@ -11,7 +11,7 @@ config = [{ 'tab': 'downloaders', 'name': 'pneumatic', 'label': 'Pneumatic', - 'description': 'Download the .strm file to a specific folder.', + 'description': 'Use Pneumatic to download .strm files.', 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/downloaders/sabnzbd/__init__.py b/couchpotato/core/downloaders/sabnzbd/__init__.py index 927a9ff2..e4162509 100644 --- a/couchpotato/core/downloaders/sabnzbd/__init__.py +++ b/couchpotato/core/downloaders/sabnzbd/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'downloaders', 'name': 'sabnzbd', 'label': 'Sabnzbd', - 'description': 'Send NZBs to your Sabnzbd installation.', + 'description': 'Use SABnzbd to download NZBs.', 'wizard': True, 'options': [ { diff --git a/couchpotato/core/downloaders/synology/__init__.py b/couchpotato/core/downloaders/synology/__init__.py index 2b4757a5..2b7e861d 100644 --- a/couchpotato/core/downloaders/synology/__init__.py +++ b/couchpotato/core/downloaders/synology/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'downloaders', 'name': 'synology', 'label': 'Synology', - 'description': 'Send torrents to Synology\'s Download Station.', + 'description': 'Use Synology Download Station to download.', 'wizard': True, 'options': [ { diff --git a/couchpotato/core/downloaders/transmission/__init__.py b/couchpotato/core/downloaders/transmission/__init__.py index 189fcd91..0fe11845 100644 --- a/couchpotato/core/downloaders/transmission/__init__.py +++ b/couchpotato/core/downloaders/transmission/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'downloaders', 'name': 'transmission', 'label': 'Transmission', - 'description': 'Send torrents to Transmission.', + 'description': 'Use Transmission to download torrents.', 'wizard': True, 'options': [ { diff --git a/couchpotato/core/downloaders/utorrent/__init__.py b/couchpotato/core/downloaders/utorrent/__init__.py index 88ceaf71..09a82a1e 100644 --- a/couchpotato/core/downloaders/utorrent/__init__.py +++ b/couchpotato/core/downloaders/utorrent/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'downloaders', 'name': 'utorrent', 'label': 'uTorrent', - 'description': 'Send torrents to uTorrent.', + 'description': 'Use uTorrent to download torrents.', 'wizard': True, 'options': [ { From 9a60f6001a96d1850735085591b6d180f8b737ac Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 2 Jan 2013 14:10:41 +0100 Subject: [PATCH 2/4] Check snatched on startup --- couchpotato/core/plugins/renamer/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index 75982ba6..91dfb339 100644 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -33,6 +33,7 @@ class Renamer(Plugin): addEvent('renamer.check_snatched', self.checkSnatched) addEvent('app.load', self.scan) + addEvent('app.load', self.checkSnatched) if self.conf('run_every') > 0: fireEvent('schedule.interval', 'renamer.check_snatched', self.checkSnatched, minutes = self.conf('run_every')) From d314a9b5b37ca03d357180699d406425949a2306 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 2 Jan 2013 14:11:11 +0100 Subject: [PATCH 3/4] Also check status on manual --- couchpotato/core/downloaders/nzbvortex/main.py | 2 +- couchpotato/core/downloaders/sabnzbd/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/downloaders/nzbvortex/main.py b/couchpotato/core/downloaders/nzbvortex/main.py index d9078f8d..894cf0e4 100644 --- a/couchpotato/core/downloaders/nzbvortex/main.py +++ b/couchpotato/core/downloaders/nzbvortex/main.py @@ -39,7 +39,7 @@ class NZBVortex(Downloader): def getAllDownloadStatus(self): - if self.isDisabled(manual = False): + if self.isDisabled(manual = True): return False raw_statuses = self.call('nzb') diff --git a/couchpotato/core/downloaders/sabnzbd/main.py b/couchpotato/core/downloaders/sabnzbd/main.py index 567ea455..e3848e40 100644 --- a/couchpotato/core/downloaders/sabnzbd/main.py +++ b/couchpotato/core/downloaders/sabnzbd/main.py @@ -65,7 +65,7 @@ class Sabnzbd(Downloader): return False def getAllDownloadStatus(self): - if self.isDisabled(manual = False): + if self.isDisabled(manual = True): return False log.debug('Checking SABnzbd download status.') From a1d4bab7932c984e4497542c39aca9cfccbc6125 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 2 Jan 2013 14:11:40 +0100 Subject: [PATCH 4/4] NZBVortex: Delete failed option --- .../core/downloaders/nzbvortex/__init__.py | 6 ++++++ couchpotato/core/downloaders/nzbvortex/main.py | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/couchpotato/core/downloaders/nzbvortex/__init__.py b/couchpotato/core/downloaders/nzbvortex/__init__.py index ce9c8587..e0e77466 100644 --- a/couchpotato/core/downloaders/nzbvortex/__init__.py +++ b/couchpotato/core/downloaders/nzbvortex/__init__.py @@ -34,6 +34,12 @@ config = [{ 'advanced': True, 'description': 'Disable this downloader for automated searches, but use it when I manually send a release.', }, + { + 'name': 'delete_failed', + 'default': 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/main.py index 894cf0e4..32b1e6e8 100644 --- a/couchpotato/core/downloaders/nzbvortex/main.py +++ b/couchpotato/core/downloaders/nzbvortex/main.py @@ -64,6 +64,21 @@ class NZBVortex(Downloader): return statuses + def removeFailed(self, item): + + if not self.conf('delete_failed', default = True): + return False + + log.info('%s failed downloading, deleting...', item['name']) + + try: + self.call('nzb/%s/cancel' % item['id']) + except: + log.error('Failed deleting: %s', traceback.format_exc(0)) + return False + + return True + def login(self): nonce = self.call('auth/nonce', auth = False).get('authNonce')