refactor: more code cleanup

This commit is contained in:
zarzet
2026-01-17 10:04:21 +07:00
parent b99764b1ad
commit 8d92d22fda
37 changed files with 33 additions and 356 deletions
+1 -2
View File
@@ -44,7 +44,6 @@ var (
)
// getProgress returns current download progress from multi-progress system
// Returns first active item's progress for backward compatibility
func getProgress() DownloadProgress {
multiMu.RLock()
defer multiMu.RUnlock()
@@ -52,7 +51,7 @@ func getProgress() DownloadProgress {
for _, item := range multiProgress.Items {
return DownloadProgress{
CurrentFile: item.ItemID,
Progress: item.Progress * 100, // Convert to percentage
Progress: item.Progress * 100,
BytesTotal: item.BytesTotal,
BytesReceived: item.BytesReceived,
IsDownloading: item.IsDownloading,