{"record":{"id":"34623aba042980e1","repo":"tonhowtf/omniget","slug":"nenhum-link-de-v-deo-do-tiktok-na-entrada","errorCode":null,"errorMessage":"nenhum link de vídeo do TikTok na entrada","messagePattern":"nenhum link de vídeo do TikTok na entrada","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/tiktok/sound.rs","lineNumber":316,"sourceCode":"        .cookies\n        .as_deref()\n        .filter(|c| !c.trim().is_empty())\n        .map(PathBuf::from)\n        .or_else(|| session.path().map(|p| p.to_path_buf()));\n\n    let list_text = match opts.list_file.as_deref().filter(|p| !p.trim().is_empty()) {\n        Some(path) => std::fs::read_to_string(path)\n            .map_err(|e| anyhow!(\"não consegui ler a lista {}: {}\", path, e))?,\n        None => String::new(),\n    };\n    let mut queue = expand_inputs(&opts.urls);\n    for url in expand_inputs(&list_text) {\n        if !queue.contains(&url) {\n            queue.push(url);\n        }\n    }\n    if queue.is_empty() {\n        return Err(anyhow!(\"nenhum link de vídeo do TikTok na entrada\"));\n    }\n\n    let audio_format = match opts.format.as_str() {\n        \"m4a\" => \"m4a\",\n        \"best\" => \"best\",\n        _ => \"mp3\",\n    };\n    let ffmpeg = crate::core::dependencies::find_tool(\"ffmpeg\").await;\n    let (client, _) = super::cookie_client(opts.session_netscape.as_deref())?;\n    let pacer = Pacer::new(opts.delay_ms);\n    let total = queue.len() as u64;\n    let mut items: Vec<SoundItem> = Vec::with_capacity(queue.len());\n\n    for (i, url) in queue.iter().enumerate() {\n        report(\n            &progress,\n            ID,\n            \"progress\",","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/tiktok/sound.rs#L298-L334","documentation":"After merging URLs from opts.urls and the optional list file through expand_inputs, sound::run requires at least one TikTok video link to process. If the resulting queue is empty there is nothing to download, so it throws this error instead of running zero jobs.","triggerScenarios":"opts.urls is empty and opts.list_file is empty/absent (read as empty String); or expand_inputs filtered out all provided inputs as non-video-link entries.","commonSituations":"Caller passes only a music/sound URL or non-TikTok text into urls; list file exists but is empty; inputs were provided in the wrong field (e.g. format instead of urls); user pasted plain text that expand_inputs does not recognize.","solutions":["Put at least one valid TikTok video URL in opts.urls","Check that the list file actually contains video links, one per line or as supported by expand_inputs","Confirm the input strings are TikTok video URLs, not sound/shortened/garbage text"],"exampleFix":"// before\nlet opts = Options { urls: vec![], list_file: Some(\"\".into()), ..opts };\nrun(&opts, progress).await?;\n// after\nlet opts = Options { urls: vec![\"https://www.tiktok.com/@user/video/123\".into()], list_file: Some(\"\".into()), ..opts };\nrun(&opts, progress).await?;","handlingStrategy":"validation","validationCode":"let has_input = !opts.urls.is_empty()\n    || opts.list_file.as_deref().filter(|p| !p.trim().is_empty())\n        .and_then(|p| std::fs::read_to_string(p).ok())\n        .map_or(false, |t| !t.trim().is_empty());\nanyhow::ensure!(has_input, \"informe ao menos um link de vídeo do TikTok\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Disable the download button in the UI until at least one URL is provided","Validate URL shapes against a TikTok video pattern before calling run()"],"tags":["validation","empty-input","rust"],"backgroundTag":"empty-required-field","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"}