From e4d9accc8ed2b4134d511609fdb7a46dbef6b5a2 Mon Sep 17 00:00:00 2001 From: Gauvain Date: Wed, 3 Jun 2026 23:09:56 +0200 Subject: [PATCH] refactor(logs): drop per-tick download & wifi debug spam The download progress listener logged transcoding detection, bitrate and the estimated size on every progress event (every ~500ms per active download), and the WiFi SSID helpers logged on every poll. Remove this debug noise; the throttled 10%-milestone progress log and the genuine warn/error logs stay. --- hooks/useWifiSSID.ts | 1 - modules/wifi-ssid/index.ts | 1 - .../hooks/useDownloadEventHandlers.ts | 31 ++++--------------- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/hooks/useWifiSSID.ts b/hooks/useWifiSSID.ts index 2b442a582..de0e28285 100644 --- a/hooks/useWifiSSID.ts +++ b/hooks/useWifiSSID.ts @@ -53,7 +53,6 @@ export function useWifiSSID(): UseWifiSSIDReturn { const fetchSSID = useCallback(async () => { if (Platform.isTV) return; const result = await getSSID(); - console.log("[WiFi Debug] Native module SSID:", result); setSSID(result); }, []); diff --git a/modules/wifi-ssid/index.ts b/modules/wifi-ssid/index.ts index 71bfbcfbc..00d2bf838 100644 --- a/modules/wifi-ssid/index.ts +++ b/modules/wifi-ssid/index.ts @@ -15,7 +15,6 @@ const WifiSsidModule = */ export async function getSSID(): Promise { if (!WifiSsidModule) { - console.log("[WifiSsid] Module not available on this platform"); return null; } diff --git a/providers/Downloads/hooks/useDownloadEventHandlers.ts b/providers/Downloads/hooks/useDownloadEventHandlers.ts index ebf8b116b..0bc8c3522 100644 --- a/providers/Downloads/hooks/useDownloadEventHandlers.ts +++ b/providers/Downloads/hooks/useDownloadEventHandlers.ts @@ -142,31 +142,12 @@ export function useDownloadEventHandlers({ } else { // Transcoding - estimate from bitrate const process = processes.find((p) => p.id === processId); - console.log( - `[DPL] Transcoding detected, looking for process ${processId}, found:`, - process ? "yes" : "no", - ); - if (process) { - console.log(`[DPL] Process bitrate:`, { - key: process.maxBitrate.key, - value: process.maxBitrate.value, - runTimeTicks: process.item.RunTimeTicks, - }); - if (process.maxBitrate.value && process.item.RunTimeTicks) { - const { estimateDownloadSize } = require("@/utils/download"); - estimatedTotalBytes = estimateDownloadSize( - process.maxBitrate.value, - process.item.RunTimeTicks, - ); - console.log( - `[DPL] Calculated estimatedTotalBytes:`, - estimatedTotalBytes, - ); - } else { - console.log( - `[DPL] Cannot estimate size - bitrate.value or RunTimeTicks missing`, - ); - } + if (process?.maxBitrate.value && process.item.RunTimeTicks) { + const { estimateDownloadSize } = require("@/utils/download"); + estimatedTotalBytes = estimateDownloadSize( + process.maxBitrate.value, + process.item.RunTimeTicks, + ); } }