[AutoAdd] Fix the logging for a failed added torrent

Add a missing arg to the failed added torrent callback and update the
logging text based on magnet or not.
This commit is contained in:
Calum Lind 2018-06-09 21:19:12 +01:00
parent cbdde7bba5
commit b2b7703081
1 changed files with 7 additions and 2 deletions

View File

@ -317,9 +317,14 @@ class Core(CorePluginBase):
else:
os.remove(filepath)
def fail_torrent_add(err_msg, filepath):
def fail_torrent_add(err_msg, filepath, magnet):
# torrent handle is invalid and so is the magnet link
log.error('Cannot Autoadd torrent file: %s: %s', filepath, err_msg)
log.error(
'Cannot Autoadd %s: %s: %s',
'magnet' if magnet else 'torrent file',
filepath,
err_msg,
)
os.rename(filepath, filepath + '.invalid')
try: