diff --git a/frontend/src/lib/offline/DownloadManager.ts b/frontend/src/lib/offline/DownloadManager.ts index 3a409ab..55b68a5 100644 --- a/frontend/src/lib/offline/DownloadManager.ts +++ b/frontend/src/lib/offline/DownloadManager.ts @@ -226,21 +226,9 @@ class DownloadManagerClass { * Process the download queue */ private async processQueue(): Promise { - if (this.isProcessing || this.isPaused) { - logger.info('[DownloadManager] processQueue skipped', { - isProcessing: this.isProcessing, - isPaused: this.isPaused, - }); - return; - } + if (this.isProcessing || this.isPaused) return; if (this.queue.length === 0 && this.activeDownloads.size === 0) return; - logger.info('[DownloadManager] processQueue starting', { - queueLength: this.queue.length, - activeDownloads: this.activeDownloads.size, - maxConcurrent: this.config.maxConcurrent, - }); - this.isProcessing = true; while ( @@ -251,11 +239,6 @@ class DownloadManagerClass { const job = this.queue.shift(); if (!job) break; - logger.info('[DownloadManager] Starting download', { - storageKey: job.storageKey.slice(-50), - url: job.url.slice(0, 80), - }); - this.activeDownloads.set(job.url, job); this.downloadAsset(job); } @@ -289,22 +272,11 @@ class DownloadManagerClass { }); } - logger.info('[DownloadManager] Fetching', { - url: job.url.slice(0, 100), - hasRangeHeader: !!headers['Range'], - }); - const response = await fetch(job.url, { signal: job.abortController.signal, headers, }); - logger.info('[DownloadManager] Fetch response', { - status: response.status, - ok: response.ok, - contentLength: response.headers.get('content-length'), - }); - // Accept both 200 OK and 206 Partial Content if (!response.ok && response.status !== 206) { throw new Error(`HTTP ${response.status}: ${response.statusText}`); @@ -422,12 +394,6 @@ class DownloadManagerClass { await OfflineDbManager.removeFromQueue(job.id); } - logger.info('[DownloadManager] Download complete', { - storageKey: job.storageKey.slice(-50), - bytesLoaded: job.bytesLoaded, - isPartial: job.isPartial, - }); - downloadEventBus.emitPreloadComplete({ jobId: job.id, assetId: job.assetId,