Create an invalid torrent file (something this is not bencoded) eg
echo "Invalid torrent file format" > /path/to/watch-folder/bad.torrent
Expected outcome
Torrent file should be detected by AutoAdd, and after failing attempts to
add a few times, it should be renamed to bad.torrent.invalid (using
existing file failure functionality) and AutoAdd should continue to
monitor the folder.
Actual outcome
Watch folder is disabled in AutoAdd, and torrent filename is unchanged.
Re-enabling the folder in AutoAdd, just leads to repeated disables.
{{{
deluged[112816]: 21:51:20 [ERROR ][deluge_autoadd.core :367 ]
Disabling "/path/to/watch-folder", error during update: [Failure instance:
Traceback: <class 'RuntimeError'>: unexpected end of file in bencoded
string
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:108:enable_looping
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:379:enable_watchdir
deluged[112816]: /usr/local/lib/python3.8/dist-
packages/twisted/internet/task.py:194:start
deluged[112816]: /usr/local/lib/python3.8/dist-
packages/twisted/internet/task.py:239:__call__
deluged[112816]: --- <exception caught here> ---
deluged[112816]: /usr/local/lib/python3.8/dist-
packages/twisted/internet/defer.py:151:maybeDeferred
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:278:update_watchdir
deluged[112816]: /usr/lib/python3/dist-
packages/deluge/plugins/AutoAdd-1.8.egg/deluge_autoadd/core.py:164:load_torrent
deluged[112816]: ]
}}}
Root cause is failure to check data returned from bdecode function. (it
return None when decoding fails) (pull request to fix coming shortly)
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3515>
Deluge <https://deluge-torrent.org/>
Deluge Project
* status: new => closed
* resolution: => Fixed
* milestone: needs verified => 2.1.2
Comment:
Thanks for fix!
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3515#comment:1>