Skip to content

Comments

feat: add a progress bar to download#302

Merged
mdimopoulos merged 1 commit intofluendo:masterfrom
dabrain34:_dab_dl_rate
Oct 14, 2025
Merged

feat: add a progress bar to download#302
mdimopoulos merged 1 commit intofluendo:masterfrom
dabrain34:_dab_dl_rate

Conversation

@dabrain34
Copy link
Contributor

In order to track the download progress,
add a download progress bar to the terminal output.

@dabrain34 dabrain34 force-pushed the _dab_dl_rate branch 2 times, most recently from d3d28db to fcd9718 Compare October 10, 2025 13:38
@mdimopoulos
Copy link
Contributor

Thanks for the contribution. The progress bar doesn't seem to fulfill it's purpose.
I tried it with Python 3.9 and this is an extract of the results

./fluster.py d JVT-AVC_V1

Screenshot from 2025-10-14 11-00-02

I didn't check the code in detail, as far as i understand the new functions are not aware of the size of the file that is being downloaded in advance. Therefore it is impossible to calculate progress.
Can you check please?

@dabrain34
Copy link
Contributor Author

dabrain34 commented Oct 14, 2025

This is expected as the total_size is unknown from the server. I updated the PR to display ??? . Instead of the downloaded/downloaded, it will be downloaded/???

@mdimopoulos
Copy link
Contributor

Hmmmm, i miss the point of adding a progress bar, ETA and percentage that don't work though.
If what you are interested in is to display the downloaded data and download rate, can you please limit the PR to include code that does exclusively that?
I would also suggest to print every 10-15 seconds instead of after every chunk to avoid saturating terminal output.

@mdimopoulos mdimopoulos self-requested a review October 14, 2025 13:18
Copy link
Contributor

@mdimopoulos mdimopoulos left a comment

Choose a reason for hiding this comment

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

See previous comment

@dabrain34
Copy link
Contributor Author

I understand your disappointment but this is due to the server limitation not to the algorithm, we cant know the size in advance except if we add it to the json file. The algorithm is correct when the total size is reported by the server.
I tried another approach with a different log in the total_size==0 case but it was not that pretty in term of UX.
Here we can have the information about the downloaded size AND the download rate, telling the activity.

I initially used /r but it was kind of weired with the multiple jobs behavior that's why I came for a new line on each update.

I can decrease the frequence of updates if you like. I would recommend 5s instead to have a feeling of download progress when its working fine, are you okay ?

@mdimopoulos
Copy link
Contributor

I understand your disappointment but this is due to the server limitation not to the algorithm, we cant know the size in advance except if we add it to the json file. The algorithm is correct when the total size is reported by the server. I tried another approach with a different log in the total_size==0 case but it was not that pretty in term of UX. Here we can have the information about the downloaded size AND the download rate, telling the activity.

I initially used /r but it was kind of weired with the multiple jobs behavior that's why I came for a new line on each update.

I can decrease the frequence of updates if you like. I would recommend 5s instead to have a feeling of download progress when its working fine, are you okay ?

Thanks for the clarifications. I agree to an update internal of 5 seconds.
For the rest, please check my individual comments. With a bit of cleanup we can remove the parts of the progress bar that make no sense. If in the future we are able to calculate ETA and correct download percentages we can add the code back.

@mdimopoulos
Copy link
Contributor

As a general comment, please check my previous code comments using "Files changed" tab. Under "conversation" tab it is impossible to know which line of code each one refers to.

@dabrain34 dabrain34 force-pushed the _dab_dl_rate branch 2 times, most recently from 0f8d011 to 900d6f1 Compare October 14, 2025 15:06
In order to track the download progress,
add a download progress bar to the terminal output.
@mdimopoulos mdimopoulos merged commit 2f0617a into fluendo:master Oct 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants