Repository navigation
DLManager: fix ETA dropping whole hours from time left display - #788
Merged
loathingKernel merged 1 commit intoOct 1, 2026
Merged
Conversation
Contributor
|
Shouldn't this PR be made to https://github.com/legendary-gl/legendary too? |
loathingKernel
requested changes
Oct 1, 2026
The value sent to the UI was the remainder left over after splitting the estimate into hours, minutes and seconds, so the whole-hours component was discarded. The label therefore always read as 0:MM:SS, under-reported the remaining time by whole hours, and jumped back up to 0:00:0x each time the estimate crossed an hour boundary. The log line was unaffected because it formats from the separate variables, which is what made the UI/log disagreement visible. Keep the total in its own variable and pass that through instead.
Burningflames86
force-pushed
the
fix_eta_time_left_hours
branch
from
October 1, 2026 16:17
2cfd9d3 to
0af58a0
Compare
Contributor
Author
|
loathingKernel
approved these changes
Oct 1, 2026
Contributor
|
Thank you for figuring this one out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The "Time left:" display during downloads under-reports the remaining time
by whole hours, and periodically jumps backwards.
estimatewas reused when splitting the ETA into its parts:Python evaluates the whole right-hand side first, then binds left to right,
so
estimatewas overwritten with the sub-hour remainder. The value laterpassed to the UI as
estimated_time_leftwas therefore alwaysestimate % 3600— the whole-hours component was silently discarded.Effect
0:MM:SS, under-reporting by whole hours0:00:0xeach time the estimate crosses an hourboundary, so a multi-hour download looks like several sub-hour countdowns
The ETA log line was unaffected, because it formats from the separate
hours/minutes/secondsvariables. That disagreement between the loggedETA:and the on-screen label is the easiest way to observe this.Fix
Keep the total in its own variable and pass that through to
UIUpdate.The logged ETA is unchanged.
Scope
rare/lgndr/downloader/mp/manager.pyonly (+6/-5). No changes to the ETAlog format, to
get_time, or to any UI code — the existing formatting isleft as-is.
Verification
HH:MM:SSexactly:eta_total == hours * 3600 + minutes * 60 + secondsETA:and counts down monotonically across hour boundaries
ruffclean;pylintreports no new issues