Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qBittorrent rechecking torrents after disconnecting external hard drive #11973

Closed
Ascentw opened this issue Feb 6, 2020 · 14 comments
Closed

qBittorrent rechecking torrents after disconnecting external hard drive #11973

Ascentw opened this issue Feb 6, 2020 · 14 comments
Labels

Comments

@Ascentw
Copy link

@Ascentw Ascentw commented Feb 6, 2020

This is not my post, it's a post that I relate and found in reddit(Posted by u/SoleaPorBuleria), and I tought it has a good explanation about something that would be really good if implemented, since it take hours to recheck every torrent of the external hard drive. Reddit post:

"I just (finally) made the switch from uTorrent to qBittorrent (v.4.1.8 for Mac). So far I'm loving it, but I've noticed a problem which I can anticipate being very annoying, and I wanted to see if there's a way around it.

I seed a lot of my torrents from an external hard drive. Sometimes I don't have that hard drive with me, particularly when I'm travelling. If I open qBittorrent when the external HD isn't connected, it sets all the torrents stored on the external drive to 0% completion. When I connect the HD again and resume seeding, it rechecks every single torrent, which takes quite a while.

For all its flaws, uTorrent didn't do this - when it couldn't find files due to their being on a disconnected drive, it at least recognized that they were complete, and started them right back up again when I connected that drive.

Is there any way to turn this behavior off, or to circumvent it? Right now I can't figure out how to download torrents while travelling without having to recheck dozens of huge files when I connect my HD again. Thanks!"

Goal: If the external HD is removed for completed seeding files, it only say "harddrive removed", and when you put it back, you only need to "start" the torrents again, without needing to recheck every torrent.

Grateful, Ascent.

@glassez

This comment has been minimized.

Copy link
Member

@glassez glassez commented Feb 9, 2020

Currently you can close qBittorrent, then attach you external drive and then start qBittorrent again.

@Snurre86

This comment has been minimized.

Copy link

@Snurre86 Snurre86 commented Feb 15, 2020

It is not suppose to do that. If the location is unreachable it should say "error files missing" or something like that and skip rechecks. But pop up automatically when you reconnect the drive and restart qbittorrent.

@an0n666

This comment has been minimized.

Copy link
Contributor

@an0n666 an0n666 commented Feb 20, 2020

Sounds more like libtorrent issue. You better report it in libtorrent issue tracker.

@ComptonAlvaro

This comment has been minimized.

Copy link

@ComptonAlvaro ComptonAlvaro commented Feb 22, 2020

I have the same problem few days ago. I shutdowm my computer, the external drivers didn't turn on, and it seems that qBittorrent mark the torrents as missed or something like that. When stop qBittorrent, attched the external drives and start qBittorrent again, it checked all the torrents.

Perhaps it could be possible to implement a way that if qBittorrent detects that the drive is not available, if later is available, don't recheck all the torrents again. Just and idea, or find someway to avoid to recheck torrents if the reason it is because in some moment the drive is not available.

Thanks.

@FranciscoPombal

This comment has been minimized.

Copy link
Member

@FranciscoPombal FranciscoPombal commented Feb 22, 2020

@glassez

Currently you can close qBittorrent, then attach you external drive and then start qBittorrent again.

This appears to not be the fix because the problematic sequence seems to be:

  1. Download torrent to external drive
  2. Close qBittorrent, disconnect external drive (e.g. for traveling)
  3. Open qBittorrent when the external HD isn't connected (e.g. while traveling)
  4. Torrents get set to 0%
  5. Close qBittorrent
  6. Connect drive
  7. Open qBIttorrent, it rechecks all external drive torrents.

@Ascentw @ComptonAlvaro Can you confirm I understood the steps correctly?

If that is the case, here is a possible way of preventing this, though I'm not sure if would work, and I'm not sure if this should be handled by libtorrent or qBIttorrent:

  1. When creating the .fastresume, save mount point information of the torrent save path in it
  2. When resuming a torrent, check the mount point information of the save path first. If there is any missing mount in the expected path, don't set the torrent to "Missing files". Keep the existing state and toggle a "Disk/Drive not present" flag instead.
  3. Completed torrents with the "Disk/Drive not present" flag when qBittorrent is started would go into their previous state if the drive is now present. "Force recheck" on torrents with the "Disk/Drive not present" flag would leave the flag toggled if the drive is still not present; otherwise, just move them to the previous state and clear the flag, instead of checking the files.

@glassez what do you think?

@glassez

This comment has been minimized.

Copy link
Member

@glassez glassez commented Feb 22, 2020

@FranciscoPombal, the original issue description says:

If I open qBittorrent when the external HD isn't connected, it sets all the torrents stored on the external drive to 0% completion. When I connect the HD again and resume seeding, it rechecks every single torrent

So I suppose the author just connects disk and clicks "Resume" button.

@glassez

This comment has been minimized.

Copy link
Member

@glassez glassez commented Feb 22, 2020

@FranciscoPombal, you can also test it even if you have no external drive. There is no difference between removing external drive or, e.g., renaming the folder you store some torrents to.

@FranciscoPombal

This comment has been minimized.

Copy link
Member

@FranciscoPombal FranciscoPombal commented Feb 22, 2020

@FranciscoPombal, you can also test it even if you have no external drive. There is no difference between removing external drive or, e.g., renaming the folder you store some torrents to.

@glassez My point is was that maybe there should be a distinction. But I just followed my own steps with the rename method (no mounts involved), and even in that case, qBittorrent did not recheck the files. Thus, I'm closing this as fixed.

@an0n666

This comment has been minimized.

Copy link
Contributor

@an0n666 an0n666 commented Feb 22, 2020

If you rename the file and then restart qBt. The torrent will say missing files.
When you rename the file back (Or reconnect the drive) and resume it, it starts rechecking the torrent.

@FranciscoPombal

This comment has been minimized.

Copy link
Member

@FranciscoPombal FranciscoPombal commented Feb 22, 2020

@an0n666 I followed the 7 steps here #11973 (comment) (except everywhere that said connect/disconnect the drive I renamed the containing folder to a correct/incorrect name) and could not reproduce.

@glassez

This comment has been minimized.

Copy link
Member

@glassez glassez commented Feb 22, 2020

When you rename the file back (Or reconnect the drive) and resume it, it starts rechecking the torrent.

Yes. It does. It's intentional behavior.
But if you close qBittorrent, rename it back (reconnect drive) and restart qBittorrent it will not recheck.

@an0n666

This comment has been minimized.

Copy link
Contributor

@an0n666 an0n666 commented Feb 22, 2020

@an0n666 I followed the 7 steps here #11973 (comment) (except everywhere that said connect/disconnect the drive I renamed the containing folder to a correct/incorrect name) and could not reproduce.

Skip step 5 and Resume torrent after step 6.

@an0n666

This comment has been minimized.

Copy link
Contributor

@an0n666 an0n666 commented Feb 22, 2020

Yes. It does. It's intentional behavior.
But if you close qBittorrent, rename it back (reconnect drive) and restart qBittorrent it will not recheck.

I understand. But it’s not documented anywhere and that’s why people resume without restarting.

@ComptonAlvaro

This comment has been minimized.

Copy link

@ComptonAlvaro ComptonAlvaro commented Feb 23, 2020

@FranciscoPombal Right, in my case the sequence is as you describe.

I am not complete sure, because I don't remember fine all the details, but another related issue is when qBittorrent marks a torrent as missed beacuse the drive is not connected. If I close qBittorrent, connect the drive and start qBittorrent again, the torrent is still marked as missed, I have to force to download, so it recheck again, or directly I can force recheck. In both cases, the recheck is needed.

When a torrent is missed, perhaps it would be nice to know the reason to be missed, it is not the same bacause the drive is not connected in some moment than the drive is connected but there are missed files.

Because of this problem, I am developing a luncher that first check if all the drives are connected. If all the drives are connected, then start qBittorrent, if not, don't start qBittorrent and send an email to tell about the problem.

But this has limitations, bacause if I have various drives, it doesn't allow me to share the file of the connected drives. If qBittorrent could check if a drive is connect or no, it could mark the torrents of this drive as drive not available, for example, and the next time that qBittorrent is started, if the drive is connected in this case, don't rechek the torrents of this drives. Just an idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.