Progress bar

This commit is contained in:
Izuco 2022-03-05 13:32:49 +01:00
parent aa1ec94f5d
commit 30b4b571a1
No known key found for this signature in database
GPG key ID: E9CBE9E4EF3A1BFA

View file

@ -28,6 +28,9 @@ export default class Base {
makeProgressHandler(videoInfo: DownloadInfo) {
return ((data: ProgressData) => {
const progress = (typeof data.percent === 'string' ?
parseFloat(data.percent) : data.percent) / 100;
this.window.setProgressBar(progress === 1 ? -1 : progress);
this.sendMessage({
name: 'progress',
data: {