{"record":{"id":"0a7334c81cd3c894","repo":"tonhowtf/omniget","slug":"nenhum-dos-arquivos-apontados-tem-um-formato-que-eu-saiba","errorCode":null,"errorMessage":"nenhum dos arquivos apontados tem um formato que eu saiba ler","messagePattern":"nenhum dos arquivos apontados tem um formato que eu saiba ler","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/lists/merge.rs","lineNumber":577,"sourceCode":"        for (_, text) in &srcs {\n            plays.extend(crate::core::tools::music::history::parse_history(\n                text,\n                opts.min_ms,\n            ));\n        }\n        let entries = spotify_entries(&plays, opts.min_plays);\n        if !entries.is_empty() {\n            sources.push(SourceCount {\n                source: \"spotify\".into(),\n                file: opts.spotify.join(\", \"),\n                entries: entries.len(),\n            });\n            all.extend(entries);\n        }\n    }\n\n    if all.is_empty() {\n        return Err(anyhow!(\n            \"nenhum dos arquivos apontados tem um formato que eu saiba ler\"\n        ));\n    }\n    if opts.only_dated {\n        all.retain(|e| !e.date.is_empty());\n    }\n    let before = all.len();\n    let (entries, merged) = if opts.dedup {\n        dedup(all)\n    } else {\n        let mut a = all;\n        a.sort_by(|x, y| y.date.cmp(&x.date).then(x.title.cmp(&y.title)));\n        (a, 0)\n    };\n    tracing::debug!(\"media-diary: {} linhas, {} juntadas\", before, merged);\n\n    let dest = PathBuf::from(opts.dest.trim());\n    let formats = if opts.formats.is_empty() {","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/lists/merge.rs#L559-L595","documentation":"After iterating all candidate files, run checks whether any parser produced entries. If `all` is empty, none of the supplied files matched a format the library can read (Letterboxd/Trakt/Goodreads JSON/CSV), so it fails rather than returning an empty merge result.","triggerScenarios":"Calling run(opts) with files that exist but are not parseable exports: wrong file (e.g. a ZIP not yet expanded, an HTML page saved instead of CSV), CSV with unexpected headers, truncated/empty export files, or unsupported JSON shapes.","commonSituations":"User downloaded the Letterboxd ZIP but pointed at the ZIP instead of the unpacked CSVs; Goodreads export was still generating and contained only a header row; Trakt JSON is from an unofficial export with a different schema; CSV re-saved by Excel with a different delimiter/encoding.","solutions":["Verify each file in opts.inputs is an actual Letterboxd/Trakt/Goodreads export (unpack the Letterboxd ZIP first)","Open the file and confirm it is valid JSON or CSV with the expected columns/keys","Re-download the export from the service; a partial or still-generating file may be empty","Check the file encoding is UTF-8 and CSV delimiter is a comma","Confirm at least one parser for the format exists in the lists module version you are using"],"exampleFix":"// before\nlet opts = Options { inputs: vec![\"/tmp/letterboxd.zip\".into()], .. };\n// after\nlet opts = Options { inputs: vec![\"/tmp/letterboxd/unpacked/watchlist.csv\".into()], .. };","handlingStrategy":"validation","validationCode":"fn looks_like_export(path: &Path) -> bool {\n    let name = path.file_name().map(|s| s.to_string_lossy().to_lowercase()).unwrap_or_default();\n    name.ends_with(\".csv\") || name.ends_with(\".json\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Unpack the Letterboxd ZIP before pointing the merge at it","Sanity-check the first bytes/lines of each export (CSV header or JSON object) before merging","Only feed .csv and .json files produced by the official export flows"],"tags":["merge","format","unsupported-format","empty-result"],"backgroundTag":"unsupported-source-format","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"}