{"record":{"id":"606962e00ff5a5d5","repo":"tonhowtf/omniget","slug":"playlist-download-finished-without-any-files-mod","errorCode":null,"errorMessage":"Playlist download finished without any files","messagePattern":"Playlist download finished without any files","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/youtube/mod.rs","lineNumber":460,"sourceCode":"            .await\n            {\n                Ok(result) => {\n                    success_count += 1;\n                    total_bytes += result.file_size_bytes;\n                    last_path = result.file_path;\n                }\n                Err(e) => {\n                    tracing::warn!(\"Playlist video {} falhou: {}\", i + 1, e);\n                    last_err = Some(e);\n                }\n            }\n\n            let _ = forwarder.await;\n        }\n\n        if success_count == 0 {\n            return Err(last_err\n                .unwrap_or_else(|| anyhow!(\"Playlist download finished without any files\")));\n        }\n\n        if success_count > 1 {\n            last_path = playlist_dir.clone();\n        }\n\n        let _ = progress.send(ProgressUpdate::percent(100.0)).await;\n\n        Ok(DownloadResult {\n            file_path: last_path,\n            file_size_bytes: total_bytes,\n            duration_seconds: 0.0,\n            torrent_id: None,\n        })\n    }\n}\n","sourceCodeStart":442,"sourceCodeEnd":477,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/youtube/mod.rs#L442-L477","documentation":"download_playlist spawns per-item downloads and counts successes; when success_count == 0 it returns the last captured per-item error, or this fallback error if none was recorded. It means the whole playlist download completed but produced zero files, and no underlying failure message was preserved to surface.","triggerScenarios":"Every item in the playlist failed (network errors, removed/private videos, per-video quality errors) AND each failure was recorded without storing an anyhow error (e.g. items were skipped/ignored), leaving last_err None.","commonSituations":"Playlist where all videos are private or region-blocked; total network outage during the run; a filter (height cap) that rejects every entry in every video so every item fails uniformly with no recorded error.","solutions":["Check network connectivity and retry the playlist.","Run the playlist URL through yt-dlp directly to see which items fail and why.","Log/inspect per-item failures so last_err is populated and the real cause surfaces instead of this fallback.","Verify the playlist is non-empty and its videos are still public."],"exampleFix":"// ensure per-item errors are captured so the real cause is returned\nif let Err(e) = item.download().await {\n    last_err = Some(anyhow!(\"item {}: {e}\", item.url));\n    continue;\n}","handlingStrategy":"try-catch","validationCode":"let info = get_media_info(playlist_url).await?;\n// ensure playlist resolves to entries before downloading\nif info.entries.as_ref().map_or(true, |e| e.is_empty()) {\n    return Err(anyhow!(\"playlist is empty or unavailable\"));\n}","typeGuard":null,"tryCatchPattern":"match download_playlist(url).await {\n    Err(e) if e.to_string().contains(\"finished without any files\") => {\n        eprintln!(\"All playlist items failed; check network and item availability\");\n    }\n    r => r?,\n}","preventionTips":["Capture each per-item error so the real root cause is reported instead of the fallback","Pre-validate the playlist has accessible entries","Retry failed items once with backoff before declaring the batch failed","Surface per-item failure lists to the user"],"tags":["youtube","playlist","batch-download"],"backgroundTag":"empty-result-set","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}