qBT downloads existing file without rechecking first

Bug #510801 reported by NovA
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Medium
Christophe Dumez

Bug Description

It seems that 2.1.1 bugfix introduced a bug. When the torrent is started for a file I already have, qBitTorrent just begins downloading it without checking if it is the same or not. Doing force_recheck manually and then starting torrent begins seeding as expected.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I have just tested here and it worked just fine:
1. I added a torrent file to the list
2. In torrent addition dialog, I edited the save path to point to the folder where I already have the file
3. qBittorrent started checking the torrent and went to 100%, then started seeding.

The issue may be a side effect of another feature. For example, are you using a different folder for incomplete torrents? Did you label the torrent (and did you enable the feature "Append torrent label to save path"?)? What version of libtorrent are you using exactly?

Did the torrent contain a single file or does it contain a root folder with files in it?

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
milestone: none → 2.1.2
status: New → Incomplete
Revision history for this message
NovA (av-nova) wrote :

I've tested it with 2 torrents. One has one file, other has bunch of them in a root folder. I'm add torrents in paused state and then start it from transfer list. Here is my actions for the torrent with a single file:
1. In the torrent addition dialog I edited the save folder and renamed file in the contents list, so that the full file path points to the already existed one.
2. Torrent was added to the transfer list in paused state. I run the command Edit->Start
3. qBitTorrent immediately begins downloading the torrent somewhere, most likely over existing file.
4. I stopped downloading and run the command Force recheck and wait till qBitTorrent rechecked torrent successfully.
5. I started torrent again. qBitTorrent begin seeding.

Revision history for this message
NovA (av-nova) wrote :

Forgot to mention that I don't use labels (yet), and different folder for incomplete torrents.
My libtorrent is provided by the package libtorrent-rasterbar5-0.14.8-6.1.x86_64 from the same repository as qBittorrent itself.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. This is probably due to the renaming. I'll see if this is something I can do. Most of this is handled by libtorrent so I think the best I can do I force recheck automatically after renaming.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. I committed the fix to SVN. Thanks. I chose to force a recheck automatically when a torrent file is renamed.

Changed in qbittorrent:
importance: Undecided → Medium
status: Incomplete → Fix Committed
Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I think I'll improve that and recheck only if the destination file is detected.

Changed in qbittorrent:
status: Fix Committed → In Progress
Revision history for this message
NovA (av-nova) wrote :

Yes indeed, it's connected with renaming. I've just checked with the same torrent.
But this worked in 2.1.0 as I can remember. There was a bug when manual rechecking didn't work for paused torrents, now automatic rechecking didn't work. Probably the fix touched something extra?
What do you mean by "force recheck automatically after renaming"? If I rename file qBittorent immediately starts rechecking? It's not good then...

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

As I said, I'll check if the destination file existed before forcing a recheck. This way, it will only recheck when necessary.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. Fixed. Thanks!

Changed in qbittorrent:
status: In Progress → Fix Committed
Revision history for this message
NovA (av-nova) wrote :

My comment #7 was for your #4, I've just didn't update the page in time. Fixes going faster then I'm writing :)
But the solution is still look like a workaround, doing the work although. What if I'm change my mind to download the torrent after all. :) I think there should be some flag internally to force rechecking on start. We could set it after renaming. Probably libtorrent already has such a flag somewhere. In fact, libtorrent should do this automatically. And I really believe it was in qBitTorrent 2.1.0...

Changed in qbittorrent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.