{"record":{"id":"10800c09a4a57d32","repo":"tonhowtf/omniget","slug":"playlist-download-finished-without-any-files","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/omniget-core/src/platforms/youtube.rs","lineNumber":434,"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 {} failed: {}\", 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(\n                last_err.unwrap_or_else(|| anyhow!(\"Playlist download finished without any files\"))\n            );\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":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/youtube.rs#L416-L452","documentation":"download_playlist counts per-item successes; if success_count == 0 after all tasks finish and no per-item error was captured in last_err, this fallback error is returned. It means every entry in the playlist failed (or zero entries were attempted/succeeded) yet no specific error survived to be reported.","triggerScenarios":"Calling download() on a playlist URL where every item download fails and last_err was never set (e.g. all tasks were skipped/filtered, the playlist yielded zero downloadable items, or errors were swallowed), so the unwrap_or_else default fires.","commonSituations":"Private/deleted videos in a playlist combined with a parser that yields no downloadable entries; network outage killing all concurrent downloads with the last error lost; playlist containing only livestreams (each rejected) with errors dropped; output directory permission problems affecting every item.","solutions":["Check the playlist directory and logs for per-item failures — this generic message masks the real cause of each item's failure.","Verify the playlist URL is public and contains downloadable (non-live, non-private) videos.","Ensure the output/playlist directory is writable and has free disk space.","Improve error capture: store the first (not just last) per-item error so users see the real failure instead of this fallback.","Retry with fewer concurrent items to rule out rate-limiting killing all downloads."],"exampleFix":"// before\n// generic error makes diagnosis impossible\nreturn Err(last_err.unwrap_or_else(|| anyhow!(\"Playlist download finished without any files\")));\n\n// after\nreturn Err(last_err.unwrap_or_else(|| anyhow!(\n    \"Playlist download finished without any files: 0/{} items succeeded\",\n    total_items\n)));","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = platform.download(playlist_url, None, &out_dir).await {\n    eprintln!(\"playlist failed: {e}; check per-item logs and playlist contents\");\n}","preventionTips":["Ensure the playlist contains public, non-live, downloadable items","Check output directory writability and disk space before batch runs","Capture and surface per-item errors, not just the aggregate result","Retry failed playlists with lower concurrency to rule out rate limiting"],"tags":["youtube","playlist","batch-download","error-aggregation"],"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"}