Private GIT

Skip to content
Snippets Groups Projects
Commit a1d4bab7 authored by Ruud's avatar Ruud
Browse files

NZBVortex: Delete failed option

parent d314a9b5
No related branches found
No related tags found
No related merge requests found
......@@ -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.',
},
],
}
],
......
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment