kylon / Sharedown

Electron application to download Sharepoint videos (especially meant for students)
GNU General Public License v3.0
376 stars 41 forks source link

Show more progress info for the yt-dlp downloader #16

Closed abdnh closed 3 years ago

abdnh commented 3 years ago

Firstly, thank you for the great app!

This PR shows more info about the download status like speed and ETA, as taken from yt-dlp's output.

I suck at design, so please feel free to close this and do a cleaner implementation if you like. tmp7

kylon commented 3 years ago

hi, thanks for this PR!

this requires a few changes before the merge:

sharedown uses bootstrap 5, so a boostrap component must be used instead of custom html since this is a yt-dlp only thing, i would not add a new button, something like a tooltip on top should work better code style: variables on top of the scope to improve readability

abdnh commented 3 years ago

What do you think about this? image

kylon commented 3 years ago

my idea was something less invasive, for example tooltips on hover on .progress element that is disabled by default (no data-bs-toggle) that it is enabled only for yt-dlp downloads and disabled when download is complete

abdnh commented 3 years ago

I ended up using a normal tooltip. It's a bit hard to find because of the other nearby URL tooltip, but it's fine for me.

tmp9

kylon commented 3 years ago

ok, it can be improved later, no problem

the nearby tooltip is there because you cannot use the .progress element for this, that was ok for bootstrap's tooltip only

a title attribute is already set here, so you just save its value on start, set the new one on progress, and restore previous value on close.

progressElem = videoElem.querySelector('.progress').querySelector('span'); <- the element with the title attribute