feat(flash): multi-stage ETA, real-time speed display, download robus… - #24
Open
Zhang-zu-hao wants to merge 1 commit into
Open
Conversation
…tness - Add sliding-window speed/ETA calculation for download and extract stages - Map 4 stages to progress bar ranges (download 0-50%, verify 50-60%, extract 60-80%, flash 80-100%) - Separate status label (0.5s update) from log (5% threshold) frequencies - Fix verify stage progress not showing (shared _last_log_pct variable bug) - Optimize verify progress_val emission (3M calls -> ~100) - Add download integrity checks (206 status, short read, merge size mismatch) - Reorder SharePoint URLs (download=1 first, skip HTML failure) - Replace print() with _emit_log() for UI-visible messages - Add HEAD request status logging and initial progress emission - Detect disconnect/resume: clear stale samples on cur backwards or >10s gap - Add i18n keys for connecting/head_ok/head_failed/eta_calculating/verifying/extracting
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.
Summary
This PR adds multi-stage ETA and real-time speed display to the flash center, and enhances download robustness for SharePoint/OneDrive CDN.
Changes
1. Multi-stage ETA & Speed Display
curbackwards or >10s gap2. Download Robustness
got < expected)actual != declared)download=1first, skip HTML failure)print()→_emit_log()(UI-visible messages)3. Bug Fixes
_last_log_pctvariable)progress_valemission (3M→100 calls)4. i18n
connecting,head_ok,head_failed,eta_calculating,verifying,extracting_with_eta{speed}and{eta}placeholdersFiles Changed
flash.pymodules/flash/thread.pymodules/flash/page.pylocales/en/flash.jsonlocales/zh-CN/flash.jsonTest Plan
download=1URL tried first, no HTML failure