Date a photograph from its name when its header has none
WhatsApp strips every EXIF tag and names the file "WhatsApp Image 2023-06-15 at 07.00.42.jpeg"; Windows Phone, Android cameras and darktable's import put the date in the name too. Those images sorted after everything else and were absent from the timeline. name_dates reads a date (and a time, when one follows) from the file name, then from the innermost folder that states one. A sequence number after a date is not read as a time, and a bare year folder is not a date. EXIF always wins: only examined rows still undated are filled. The sweep and the metadata repair fill as they mark an image examined, and the open backfill fills catalogs examined by earlier builds. On the reference library that takes 274 undated images to 10; the no-op case is a seek on images_captured, 0.6 ms an open.
This commit is contained in:
@@ -356,6 +356,15 @@ pub fn backfill(conn: &Connection) -> Result<Vec<(&'static str, usize)>, Catalog
|
||||
out.push(("keyword_terms", n));
|
||||
}
|
||||
|
||||
// TRACES: FR-CAT-5
|
||||
// A date from the file's name for every examined image EXIF left undated.
|
||||
// The sweep does this as it examines each image; this is for the images
|
||||
// examined by a build that did not, and reads the undated side alone.
|
||||
let n = crate::name_dates::fill(conn, None)?;
|
||||
if n > 0 {
|
||||
out.push(("dates_from_names", n));
|
||||
}
|
||||
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user