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

Show download progress for folders with zero byte size as 100 instead of 0 #20567

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vikasc28
Copy link

@vikasc28 vikasc28 commented Mar 17, 2024

This commit fixes the download progress calculation for folders with zero size. Previously, the progress would be zero. Now, folders with zero size show 100% progress.

Closes #19354.

Currently:

Zerobyte_FolderIssue

Fix:
ZeroByteFolderFix

This commit fixes the download progress calculation for folders with zero size.
Previously, the progress would be Zero. Now, folders with zero size
show 100% progress.

Closes qbittorrent#19354
@vikasc28
Copy link
Author

Issue doesn't occur for files since the file progress is set to 100 if size is 0

Refer:

@glassez glassez requested a review from a team March 19, 2024 06:18
@glassez glassez added the GUI GUI-related issues/changes label Mar 19, 2024
@glassez glassez added this to the 5.0 milestone Mar 19, 2024
@@ -147,10 +147,19 @@ void TorrentContentModelFolder::recalculateProgress()
tRemaining += child->remaining();
}

if (!isRootItem() && (tSize > 0))
if (!isRootItem())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is enough to initialize m_progress as 1.0 in TorrentContentModelFolder constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI GUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WebUI] incorrect progress display of directories containing 0-byte files
2 participants