Wrong ratio when torrent is started with some files already present #15542

Closed
opened 2026-02-22 02:14:04 -05:00 by deekerman · 2 comments
Owner

Originally created by @SinTan1729 on GitHub (Mar 4, 2024).

qBittorrent & operating system versions

qBittorrent: 4.6.3 Web-UI x64
Operating system: AlmaLinux: Linux 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024 x86_64 GNU/Linux
libtorrent-rasterbar: 2.0.10-r0

What is the problem?

If a torrent is started with some of its files already present on the system, qBittorrent successfully detects them and completes the rest of the download. However, once seeding starts, the ratio shows wrong ratio. (See additional context for an example.)

Steps to reproduce

  1. Add a torrent with some files already present on the system.
  2. Let the download complete.
  3. Start seeding.

Additional context

For example, if a 1 GB torrent already had 900 MB downloaded from before, adding the torrent to the client results in 100 MB being downloaded. While seeding, if say 100 MB is uploaded, the ratio is shown as 1.0 instead of 0.1. So, the ratio is shown as uploaded/downloaded instead of uploaded/size which will be the expected behavior.

Log(s) & preferences file(s)

No response

Originally created by @SinTan1729 on GitHub (Mar 4, 2024). ### qBittorrent & operating system versions qBittorrent: 4.6.3 Web-UI x64 Operating system: AlmaLinux: Linux 5.14.0-362.18.1.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan 29 07:05:48 EST 2024 x86_64 GNU/Linux libtorrent-rasterbar: 2.0.10-r0 ### What is the problem? If a torrent is started with some of its files already present on the system, qBittorrent successfully detects them and completes the rest of the download. However, once seeding starts, the ratio shows wrong ratio. (See additional context for an example.) ### Steps to reproduce 1. Add a torrent with some files already present on the system. 2. Let the download complete. 3. Start seeding. ### Additional context For example, if a 1 GB torrent already had 900 MB downloaded from before, adding the torrent to the client results in 100 MB being downloaded. While seeding, if say 100 MB is uploaded, the ratio is shown as 1.0 instead of 0.1. So, the ratio is shown as uploaded/downloaded instead of uploaded/size which will be the expected behavior. ### Log(s) & preferences file(s) _No response_
Author
Owner
@stalkerok commented on GitHub (Mar 4, 2024): https://github.com/qbittorrent/qBittorrent/blob/f87ea1b5d3e0ac6cb3d3a6fef41721b5896b6645/src/base/bittorrent/torrentimpl.cpp#L1480-L1483
Author
Owner

@SinTan1729 commented on GitHub (Mar 4, 2024):

Damn, looks like I was the exception.

@SinTan1729 commented on GitHub (Mar 4, 2024): Damn, looks like I was the exception.
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#15542
No description provided.