mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-28 20:17:18 -06:00
Lightroom import: report skipped images as data and say so in the UI language
Review of #2230: the skipped-image warnings were English text shown as is in the result window. Skipped images are now data in the import and inspect reports (`skipped`: image id and reason: missingFile, missingFolder, missingRoot, incompletePath, masterSkipped) instead of warnings, and the result window adds one line counting them through tr_format!, translated in every UI language; the eight-warning cap is unchanged. Reader-level tests now cover a missing folder and root record and a virtual copy of a skipped master read from a catalog file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RhZLBHaSnSko1eMByPibfh
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bb9fe91bf2
commit
9eec26804d
@@ -1488,7 +1488,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
always, |_, p| {
|
||||
let path = str_param(p,"path").ok_or_else(|| bad("library.inspectLightroom","missing path"))?;
|
||||
let data = crate::lightroom_catalog::read(std::path::Path::new(path)).map_err(|e| bad("library.inspectLightroom",e))?;
|
||||
Ok(json!({"photos":data.photos.len(),"collections":data.collections.iter().filter(|r|r.get("systemOnly").and_then(Value::as_f64).unwrap_or(0.0)==0.0).count(),"missing":data.photos.iter().filter(|p| !p.original_is_file()).map(|p|&p.path).collect::<Vec<_>>(),"warnings":data.warnings}))
|
||||
Ok(json!({"photos":data.photos.len(),"collections":data.collections.iter().filter(|r|r.get("systemOnly").and_then(Value::as_f64).unwrap_or(0.0)==0.0).count(),"missing":data.photos.iter().filter(|p| !p.original_is_file()).map(|p|&p.path).collect::<Vec<_>>(),"warnings":data.warnings,"skipped":data.skipped}))
|
||||
}),
|
||||
cmd!(
|
||||
"library.importLightroom",
|
||||
|
||||
Reference in New Issue
Block a user