From b55ed6349c001556c4a064b428f2c5d4d507179a Mon Sep 17 00:00:00 2001 From: lostb1t Date: Sun, 4 May 2025 11:56:47 +0200 Subject: [PATCH] Update DownloadProvider.tsx --- providers/DownloadProvider.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/providers/DownloadProvider.tsx b/providers/DownloadProvider.tsx index 82133307..63f7246f 100644 --- a/providers/DownloadProvider.tsx +++ b/providers/DownloadProvider.tsx @@ -198,7 +198,8 @@ function useDownloadProvider() { // }; // } - // fallback. Doesn't really work for transcodes as they may be a lot smaller. We make an wild guess + // fallback. Doesn't really work for transcodes as they may be a lot smaller. + // We make an wild guess by comparing bitrates const task = tasks.find((s) => s.id === p.id); if (task) { let progress = p.progress; @@ -207,12 +208,6 @@ function useDownloadProvider() { if (maxBitrate && maxBitrate < p.mediaSource.Bitrate) { size = (size / p.mediaSource.Bitrate) * maxBitrate; } - // console.log( - // p.mediaSource.Size, - // size, - // maxBitrate, - // p.mediaSource.Bitrate, - // ); progress = (100 / size) * task.bytesDownloaded; if (progress >= 100) { progress = 99;