axcore / tartube

A GUI front-end for youtube-dl, partly based on youtube-dl-gui and written in Python 3 / Gtk 3
GNU Lesser General Public License v2.1
2.05k stars 111 forks source link

Incorrect proportion on “Checking” progress bar #562

Closed ZinRicky closed 10 months ago

ZinRicky commented 1 year ago

I am using tartube v2.4.386 on Windows 10.

The Checking progress bar I see on the bottom left of the screen has its ratio “wrong”: here I have two channels loaded, and tartube finished checking the first one and is checking the second; I expected the bar to be at 50%, but it’s more at 67%. Similarly, with just one channel the bar was at 50% right after the process started.

immagine

axcore commented 1 year ago

The bar is behaving as expected.

In an ideal world, we would show the number of videos (or megabytes) downloaded so far, and the total number of videos (or megabytes) to download, but we don't know the second number.

Instead, we use a very crude algorithm which stops the bar from being empty during the first URL, and which stops the bar from being full during the last URL. It works well enough when downloading 100 URLs, but it's not terribly useful for just 2 or 3 URLs.

In your first example it's at 67%, not 50%, because the second URL is partially done (but we don't know how much longer it will take). The exact algorithm is: (started_urls - 0.5) - total_urls

axcore commented 1 year ago

Of course, if someone can think of a better algorithm, I would be happy to implement it.