{"record":{"id":"7553f73a143374ff","repo":"tonhowtf/omniget","slug":"livestreams-not-supported-mod","errorCode":null,"errorMessage":"Livestreams not supported","messagePattern":"Livestreams not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/youtube/mod.rs","lineNumber":162,"sourceCode":"            .or_else(|| json.get(\"channel\"))\n            .and_then(|v| v.as_str())\n            .unwrap_or(\"unknown\")\n            .to_string();\n\n        let duration = json.get(\"duration\").and_then(|v| v.as_f64());\n\n        let thumbnail = json\n            .get(\"thumbnail\")\n            .and_then(|v| v.as_str())\n            .map(|s| s.to_string());\n\n        let is_live = json\n            .get(\"is_live\")\n            .and_then(|v| v.as_bool())\n            .unwrap_or(false);\n\n        if is_live {\n            return Err(anyhow!(\"Livestreams not supported\"));\n        }\n\n        let mut qualities: Vec<MediaVideoQuality> = Vec::new();\n        let mut seen_heights: HashSet<u32> = HashSet::new();\n\n        if let Some(formats) = json.get(\"formats\").and_then(|v| v.as_array()) {\n            for f in formats {\n                let height = f.get(\"height\").and_then(|v| v.as_u64()).unwrap_or(0) as u32;\n                let width = f.get(\"width\").and_then(|v| v.as_u64()).unwrap_or(0) as u32;\n                let vcodec = f.get(\"vcodec\").and_then(|v| v.as_str()).unwrap_or(\"none\");\n                let acodec = f.get(\"acodec\").and_then(|v| v.as_str()).unwrap_or(\"none\");\n\n                if vcodec == \"none\" || height == 0 {\n                    continue;\n                }\n\n                let has_audio = acodec != \"none\";\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/youtube/mod.rs#L144-L180","documentation":"Thrown by YouTubeDownloader::parse_video_info when the yt-dlp JSON reports is_live=true. Live streams cannot be downloaded by this downloader, so the operation is explicitly rejected rather than attempted.","triggerScenarios":"Calling get_media_info/download on a YouTube URL pointing to an active live stream (or an upcoming/premiere in live state) whose yt-dlp metadata has is_live set to true.","commonSituations":"Users pasting youtube.com/live/... or /watch?v=... links while a stream is ongoing; scheduled premieres still marked live; users expecting VOD download before the stream has ended.","solutions":["Wait until the stream has ended and the VOD is published, then retry.","Check the URL points to a normal video, not a live stream, before calling download.","Pre-check metadata (e.g. yt-dlp --dump-json and inspect is_live) in the UI and disable download for live content.","If live recording is genuinely needed, use a dedicated tool (e.g. streamlink) outside this library."],"exampleFix":"// before\nif is_live {\n    return Err(anyhow!(\"Livestreams not supported\"));\n}\n// after: give the user actionable context\nif is_live {\n    return Err(anyhow!(\"Livestreams not supported: '{}' is currently live. Retry after the stream ends.\", title));\n}","handlingStrategy":"validation","validationCode":"let json = ytdlp::get_video_info(&ytdlp_path, url, &[]).await?;\nif json.get(\"is_live\").and_then(|v| v.as_bool()).unwrap_or(false) {\n    eprintln!(\"{} is a live stream — download will be rejected; retry after it ends\", url);\n}","typeGuard":"fn is_live_stream(info: &serde_json::Value) -> bool {\n    info.get(\"is_live\").and_then(|v| v.as_bool()).unwrap_or(false)\n}","tryCatchPattern":"match downloader.get_media_info(url).await {\n    Err(e) if e.to_string().contains(\"Livestreams not supported\") => {\n        // inform user to retry after the stream ends, or use streamlink for live capture\n        show_live_unsupported_notice();\n    }\n    other => other,\n}","preventionTips":["Check is_live in metadata and disable the download button for live content in the UI.","Detect /live/ URLs and premieres at input time.","Schedule a retry after the stream's announced end time.","Educate users that only ended VODs are downloadable.","Suggest streamlink as the dedicated tool for live capture."],"tags":["youtube","livestream","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}