Single-file torrent file gets re-selected for download after restart #9923

Open
opened 2026-02-21 20:27:34 -05:00 by deekerman · 8 comments
Owner

Originally created by @FranciscoPombal on GitHub (Mar 23, 2020).

Please provide the following information

qBittorrent version and Operating System

Latest master, Ubuntu 18.04

If on linux, libtorrent-rasterbar and Qt version

libtorrent 1.2.5, Qt 5.9.5

What is the problem

File exclusion resets after restart in an incomplete single-file torrent.

What is the expected behavior

File exclusion should not reset in this case.

Steps to reproduce

  1. Add a single-file torrent (e.g. an Ubuntu ISO torrent, that downloads the file ubuntu-18.04.4-live-server-amd64.iso).
  2. Let it download a bit (EDIT: or completely) and pause it.
  3. Go to the content tab, unselect the file. Observe that the progress of the torrent (correctly) displays 0%.
  4. Close qBittorrent and open it again
  5. Notice that:
  6. Additionally, notice that somewhere along this process an empty .unwanted folder is created in the same directory that qBittorrent is downloading the file to. This folder will not get deleted even after the download finishes or gets deleted. EDIT: no longer happens, see https://github.com/qbittorrent/qBittorrent/issues/12226#issuecomment-692198806

Extra info(if any)

Probably related to https://github.com/qbittorrent/qBittorrent/issues/12225

Originally created by @FranciscoPombal on GitHub (Mar 23, 2020). **Please provide the following information** ### qBittorrent version and Operating System Latest master, Ubuntu 18.04 ### If on linux, libtorrent-rasterbar and Qt version libtorrent 1.2.5, Qt 5.9.5 ### What is the problem File exclusion resets after restart in an incomplete single-file torrent. ### What is the expected behavior File exclusion should not reset in this case. ### Steps to reproduce 0. Add a single-file torrent (e.g. an Ubuntu ISO torrent, that downloads the file `ubuntu-18.04.4-live-server-amd64.iso`). 1. Let it download a bit (EDIT: or completely) and pause it. 2. Go to the content tab, unselect the file. Observe that the progress of the torrent (correctly) displays 0%. 3. Close qBittorrent and open it again 4. Notice that: - ~the progress of the torrent has been reset to what it was at before the file was unselected.~ EDIT: no longer happens, see https://github.com/qbittorrent/qBittorrent/issues/12226#issuecomment-692198806 - **In the content tab of the torrent, the file has been re-selected again.** 5. ~Additionally, notice that somewhere along this process an empty `.unwanted` folder is created in the same directory that qBittorrent is downloading the file to. This folder will not get deleted even after the download finishes or gets deleted.~ EDIT: no longer happens, see https://github.com/qbittorrent/qBittorrent/issues/12226#issuecomment-692198806 ### Extra info(if any) Probably related to https://github.com/qbittorrent/qBittorrent/issues/12225
Author
Owner

@FranciscoPombal commented on GitHub (Mar 23, 2020):

Additional case, which works as expected:

If the torrent is downloaded completely and not paused, then if the file is excluded, the exclusion is not reset after restart. If the torrent is then paused, the exclusion will still be in effect.

@FranciscoPombal commented on GitHub (Mar 23, 2020): Additional case, which works as expected: If the torrent is downloaded completely and not paused, then if the file is excluded, the exclusion is not reset after restart. If the torrent is then paused, the exclusion will still be in effect.
Author
Owner

@glassez commented on GitHub (Mar 23, 2020):

Excluding file of single file torrent as well as changing its priority seems to be completely meaningless and we shouldn't allow users to do it to avoid confusion.

@glassez commented on GitHub (Mar 23, 2020): Excluding file of single file torrent as well as changing its priority seems to be completely meaningless and we shouldn't allow users to do it to avoid confusion.
Author
Owner

@FranciscoPombal commented on GitHub (Mar 23, 2020):

@glassez

Excluding file of single file torrent as well as changing its priority seems to be completely meaningless and we shouldn't allow users to do it to avoid confusion.

Ok, that's a good solution for the problem.

@FranciscoPombal commented on GitHub (Mar 23, 2020): @glassez > Excluding file of single file torrent as well as changing its priority seems to be completely meaningless and we shouldn't allow users to do it to avoid confusion. Ok, that's a good solution for the problem.
Author
Owner

@Chocobo1 commented on GitHub (Mar 24, 2020):

Excluding file of single file torrent as well as changing its priority seems to be completely meaningless and we shouldn't allow users to do it to avoid confusion.

Ok, that's a good solution for the problem.

IMO we should at least try find/fix the real root cause anyway.

@Chocobo1 commented on GitHub (Mar 24, 2020): > > Excluding file of single file torrent as well as changing its priority seems to be completely meaningless and we shouldn't allow users to do it to avoid confusion. > > Ok, that's a good solution for the problem. IMO we should at least try find/fix the real root cause anyway.
Author
Owner

@glassez commented on GitHub (Mar 24, 2020):

IMO we should at least try find/fix the real root cause anyway.

libtorrent can just revert it because of its meaninglessness so there is no real bug.

@glassez commented on GitHub (Mar 24, 2020): >IMO we should at least try find/fix the real root cause anyway. libtorrent can just revert it because of its meaninglessness so there is no real bug.
Author
Owner

@FranciscoPombal commented on GitHub (Sep 14, 2020):

Update, post-removal of .unwanted folder feature:

  • The progress no longer gets reset after restart
  • The .unwanted is no longer created (obviously)

However, the file still gets re-selected after restart.

The "Steps to reproduce" have been edited accordingly to reflect this.

@FranciscoPombal commented on GitHub (Sep 14, 2020): Update, post-removal of `.unwanted` folder feature: - The progress no longer gets reset after restart - The `.unwanted` is no longer created (obviously) However, the file still gets re-selected after restart. The "Steps to reproduce" have been edited accordingly to reflect this.
Author
Owner

@FranciscoPombal commented on GitHub (Sep 14, 2020):

Related issue: https://github.com/qbittorrent/qBittorrent/issues/6449.

@FranciscoPombal commented on GitHub (Sep 14, 2020): Related issue: https://github.com/qbittorrent/qBittorrent/issues/6449.
Author
Owner

@xavier2k6 commented on GitHub (Sep 14, 2020):

@FranciscoPombal that's a nifty little bug alright, just produced it myself on a master build.....

  • When file is unticked in contents tab, transfer list status is set to completed & done is reset to 0.0%!

unticked goes to complete

  • re-open qBittorrent, file is re-ticked in contents tab & transfer list status is set to completed showing 100% where as contents tab is showing the correct amount of when I had previously paused/unticked file.

reticked 100% complete

@xavier2k6 commented on GitHub (Sep 14, 2020): @FranciscoPombal that's a nifty little bug alright, just produced it myself on a master build..... - When file is unticked in contents tab, transfer list status is set to completed & done is reset to 0.0%! ![unticked goes to complete](https://user-images.githubusercontent.com/42386382/93124197-264e2d00-f6c1-11ea-8645-4aea9a66f5d1.png) - re-open qBittorrent, file is re-ticked in contents tab & transfer list status is set to completed showing 100% where as contents tab is showing the correct amount of when I had previously paused/unticked file. ![reticked 100% complete](https://user-images.githubusercontent.com/42386382/93124396-6d3c2280-f6c1-11ea-9ea0-3ab982d650e1.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#9923
No description provided.