Can no longer fix a moved torrent

Specific support for Deluge on Microsoft Windows OS
laharah
Member
Member
Posts: 26
Joined: Wed Jan 08, 2014 2:41 am
OS or Distro: win 7

Can no longer fix a moved torrent

Postby laharah » Wed Feb 15, 2017 5:35 am

Hi,

So with libtorrent 1.0.9.0 on windows, you can no longer redirect deluge to the new location of moved torrent files. I'm the maintainer of the FilebotTool plugin and this completely breaks its functionality.

deluge 1.3.13
libtorrent 1.0.9.0
windows 10 (tested on home and professional)
classic and daemon interface mode

Steps to reproduce:
  • Create or add completed torrent.
  • Using windows explorer or other program, move the completed torrent data (eg, move from downloads to movies folder)
  • select torrent in deluge, right click, and select "move storage"
  • select or type in new save location and hit ok

Expected Result: save location is changed, and a force re-check confirms correctness

Actual Result: path in torrent details remains unchanged, debug logs show `

Code: Select all

storage_moved_failed_alert: ... storage move failed: The system cannot move the file to a different disk drive
`

This was working in all previous builds of deluge, but it was just recently brought to my attention that it no longer works on deluge 1.3.13 for windows. As such, I don't currently know of a way to fix a moved torrent without removing and re-adding at the correct location.

apparently this behavior works as expected in qBitorrent which uses libtorrent 1.0.10.0. As this is a libtorrent issue, I'm not sure what can be done, but I wanted to bring it attention and see if anyone has any suggestions for a workaround.

I can provide debug logs on request.

Cas
Top Bloke
Top Bloke
Posts: 3466
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: Can no longer fix a moved torrent

Postby Cas » Wed Feb 15, 2017 9:59 am

It has never been recommended to change the files externally from under Deluge. There was actually a change in 1.3.13 made to prevent clobbering files: http://dev.deluge-torrent.org/ticket/2703

Looking again at lt docs, it might be better to use dont_replace

always_replace_files is the default and replaces any file that exist in both the source directory and the target directory.

fail_if_exist first check to see that none of the copy operations would cause an overwrite. If it would, it will fail. Otherwise it will proceed as if it was in always_replace_files mode.

The intention is that a client may use this as a probe, and if it fails, ask the user which mode to use. The client may then re-issue the move_storage call with one of the other modes.

dont_replace always takes the existing file in the target directory, if there is one. The source files will still be removed in that case.

laharah
Member
Member
Posts: 26
Joined: Wed Jan 08, 2014 2:41 am
OS or Distro: win 7

Re: Can no longer fix a moved torrent

Postby laharah » Wed Feb 15, 2017 9:43 pm

Cas wrote:Looking again at lt docs, it might be better to use dont_replace


Thanks for the heads up about the libtorrent flags, must have been looking at 1.3.12 and didn't see that change. Managed to implement a fix for my plugin.

I still think that deluge needs a way to fix moved storage in the UI. It's just too common a thing to have to fix, between re-orginzations, full out migrations, and plain old mistakes, it's frustrating to not be able to fix broken paths.

Perhaps the flag passed to libtorrent could be more lenient if the torrent is in the error state, or a keyword argument to the move_storage method?

I'd be willing to contribute a patch if you're so inclined.

Cas
Top Bloke
Top Bloke
Posts: 3466
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

Re: Can no longer fix a moved torrent

Postby Cas » Thu Feb 16, 2017 12:04 am

For 1.3 I am happy to switch to dont_replace flag as that seems to covers that ticket and most other use-cases.

It would be good for a UI selection but that would only land in 2.0 code.


Return to “Windows OS”

Who is online

Users browsing this forum: No registered users and 3 guests