Closed jewsh closed 7 years ago
Well, the last line isn't from that page :)
The problem is, you don't update the d.directory
property properly: it should be d.custom1
So, the whole line should look like this:
method.set_key = event.download.finished,move_complete,"d.directory.set=$d.custom1= ;execute=mv,-u,$d.get_data_full_path=,$d.custom1="
Applying that line results in the same error plus new errors.
Now when the download finishes the log in rtorrent displays : Event 'event.download.finished' failed: Bad return code.
Additionally the logfile displays:
---
^@mv: cannot stat â/home/user/.rtorrent/download/foo_dl/debian-9.1.0-amd64-netinst.isoâ: No such file or directory
/home/user/.rtorrent/download/foo_dl/
Do you have this directory?
Yes, all the directories exist and have appropriate permissions set.
This will move the file to the right location but leave a 0 byte file in the original location.
Err... Can you try out adding this at the end of the last line of your original version?
;d.stop=;d.start=
Stopping and restarting the download is necessary to get its 'base path' updated. So:
method.set_key =event.download.finished,move_complete,"d.directory.set=~/.rtorrent/download ;execute=mv,-u,$d.get_data_full_path=,$d.custom1=;d.stop=;d.start="
If this works, then try to add back the previously mentioned d.custom1 variable.
And if all works, can you also update the wiki page? :)
method.set_key =event.download.finished,move_complete,"d.directory.set=~/.rtorrent/download ;execute=mv,-u,$d.get_data_full_path=,$d.custom1=;d.stop=;d.start="
Has the same effect as the original, e.g. moves the file but a 0 byte file remains in the original location and rtorrent reports missing chunks.
method.set_key = event.download.finished,move_complete,"d.directory.set=$d.custom1= ;execute=mv,-u,$d.get_data_full_path=,$d.custom1=;d.stop=;d.start="
Results in Event 'event.download.finished' failed: Bad return code.
and the missing chunks error, also does not move the file properly as before.
This is again using the wrong dir AFTER the change. And again, put the handler into its own method, call that and pass the path as an argument, use "$argument.0=" which is frozen.
@pyroscope which handler should be put into its own method and how? Can you either elaborate your answer or tell us where you get your info from?
In #625 that you duped.
someone fix the damn wiki.
After some testing i think i made it work. Proper documentation would be nice though.
@jewsh can you either update the wiki with what you did, or post it here to have someone else update the wiki?
still looking for an answer 6 years later :/
@awsms The project seems dead : i switched (because of that kind of issues) to Transmission now (docker image - also in daemon mode).
I just tested the snippet in the wiki and it appears to work as expected. Posting your config and the exact issue you're getting would help to narrow it down, but basically this ends up happening whenever data isn't where rtorrent expects it to be when re-starting a completed torrent, which can be for a myriad of reasons when user-defined events are involved.
The project seems dead : i switched (because of that kind of issues) to Transmission now (docker image - also in daemon mode).
Comments such as these help no one.
I am trying to move finished torrents to directories based on their watch directory. The wiki contains an entry for just this exact usecase.
Based on the wiki entry here
This will move the file to the right location but leave a 0 byte file in the original location. In rtorrent itself the error message "Download registered as completed, but hash check returned unfinished chunks." will be displayed.