Added logging
This commit is contained in:
1 parent
55483cf736
commit
1cea50bcfb
1 file changed
+3
-2
@@ -260,20 +260,21 @@ class Release(Plugin):
|
|||||||
# Test to see if any downloaders are enabled for this type
|
# Test to see if any downloaders are enabled for this type
|
||||||
downloader_enabled = fireEvent('download.enabled', manual, data, single = True)
|
downloader_enabled = fireEvent('download.enabled', manual, data, single = True)
|
||||||
if not downloader_enabled:
|
if not downloader_enabled:
|
||||||
log.info('Tried to download, but none of the "%s" downloaders are enabled or gave an error', (data.get('protocol')))
|
log.info('Tried to download, but none of the "%s" downloaders are enabled or gave an error', data.get('protocol'))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Download NZB or torrent file
|
# Download NZB or torrent file
|
||||||
filedata = None
|
filedata = None
|
||||||
if data.get('download') and (ismethod(data.get('download')) or isfunction(data.get('download'))):
|
if data.get('download') and (ismethod(data.get('download')) or isfunction(data.get('download'))):
|
||||||
filedata = data.get('download')(url = data.get('url'), nzb_id = data.get('id'))
|
filedata = data.get('download')(url = data.get('url'), nzb_id = data.get('id'))
|
||||||
|
log.info('Tried to download, but the "%s" provider gave an error', data.get('protocol'))
|
||||||
if filedata == 'try_next':
|
if filedata == 'try_next':
|
||||||
return filedata
|
return filedata
|
||||||
|
|
||||||
# Send NZB or torrent file to downloader
|
# Send NZB or torrent file to downloader
|
||||||
download_result = fireEvent('download', data = data, media = media, manual = manual, filedata = filedata, single = True)
|
download_result = fireEvent('download', data = data, media = media, manual = manual, filedata = filedata, single = True)
|
||||||
if not download_result:
|
if not download_result:
|
||||||
log.info('Tried to download, but the "%s" downloader gave an error', (data.get('protocol')))
|
log.info('Tried to download, but the "%s" downloader gave an error', data.get('protocol'))
|
||||||
return False
|
return False
|
||||||
log.debug('Downloader result: %s', download_result)
|
log.debug('Downloader result: %s', download_result)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user