mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-20 02:18:59 +00:00
Separate download_current and total_size updates in pull progress
Update download_current and total_size independently in the DOWNLOADING handler. This ensures download_current is updated even when total is not yet available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -182,12 +182,9 @@ class ImagePullProgress:
|
|||||||
if status is LayerPullStatus.DOWNLOADING:
|
if status is LayerPullStatus.DOWNLOADING:
|
||||||
# Mark that we've seen downloading - now we know layer count is complete
|
# Mark that we've seen downloading - now we know layer count is complete
|
||||||
self._seen_downloading = True
|
self._seen_downloading = True
|
||||||
if (
|
if entry.progress_detail and entry.progress_detail.current is not None:
|
||||||
entry.progress_detail
|
|
||||||
and entry.progress_detail.current is not None
|
|
||||||
and entry.progress_detail.total is not None
|
|
||||||
):
|
|
||||||
layer.download_current = entry.progress_detail.current
|
layer.download_current = entry.progress_detail.current
|
||||||
|
if entry.progress_detail and entry.progress_detail.total is not None:
|
||||||
# Only set total_size if not already set or if this is larger
|
# Only set total_size if not already set or if this is larger
|
||||||
# (handles case where total changes during download)
|
# (handles case where total changes during download)
|
||||||
layer.total_size = max(layer.total_size, entry.progress_detail.total)
|
layer.total_size = max(layer.total_size, entry.progress_detail.total)
|
||||||
|
|||||||
Reference in New Issue
Block a user