{"record":{"id":"8d11c27c9baf3aaf","repo":"tonhowtf/omniget","slug":"gallery-dl-completed-but-downloaded-no-new-files-already","errorCode":null,"errorMessage":"gallery-dl completed but downloaded no new files (already archived or empty gallery)","messagePattern":"gallery-dl completed but downloaded no new files \\(already archived or empty gallery\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/gallerydl/mod.rs","lineNumber":313,"sourceCode":"            let detail = stderr_content\n                .lines()\n                .rev()\n                .find(|l| {\n                    let l = l.to_lowercase();\n                    l.contains(\"error\")\n                        || l.contains(\"forbidden\")\n                        || l.contains(\"not found\")\n                        || l.contains(\"unsupported\")\n                })\n                .unwrap_or(\"gallery-dl failed\")\n                .trim()\n                .to_string();\n            return Err(anyhow!(detail));\n        }\n\n        let (file_path, total_bytes) = collect_new_files(&opts.output_dir, started_at);\n        if total_bytes == 0 {\n            return Err(anyhow!(\n                \"gallery-dl completed but downloaded no new files (already archived or empty gallery)\"\n            ));\n        }\n\n        let _ = progress.send(ProgressUpdate::percent(100.0)).await;\n\n        Ok(DownloadResult {\n            file_path,\n            file_size_bytes: total_bytes,\n            duration_seconds: 0.0,\n            torrent_id: None,\n        })\n    }\n}\n\nfn collect_new_files(dir: &Path, since: SystemTime) -> (PathBuf, u64) {\n    let mut total: u64 = 0;\n    let mut newest: Option<(SystemTime, PathBuf)> = None;","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/gallerydl/mod.rs#L295-L331","documentation":"gallery-dl exited successfully but collect_new_files found zero new files afterwards. The {} is not a format placeholder — the message names the two causes directly: every item was already in the archive (previously downloaded) or the gallery is empty, so there is nothing new to return.","triggerScenarios":"Thrown at src-tauri/src/platforms/gallerydl/mod.rs:313 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If items were downloaded before, clear or move the gallery-dl archive/download-archive database","Check the gallery actually contains media and is not empty","Verify the output directory was not already populated with the same files"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}