Rebuild: an image without words around it is keyed as a stem
Test and deploy / test (push) Successful in 21s
Test and deploy / deploy (push) Skipped

So a cover 'x.jpg' joins 'x.part01.rar' in a stem-named post; an image
set like 'IMG_008' keys as the stem 'IMG'. Both implementations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-09 12:23:47 +02:00
1 parent 14758a5b7a
commit 7b7175c229
3 files changed
+7 -3

No files matched your search

+3 -1
View File
@@ -534,7 +534,7 @@ pub fn release_identity(poster: &str, subject: &str, name: &str) -> Release {
}
if image {
let name = if prefix.is_empty() { stem.clone() } else { prefix.clone() };
return Release { key: hash(&["images", poster, &prefix]), name, source: "stem", file_total };
return Release { key: hash(&["stem", poster, &name]), name, source: "stem", file_total };
}
Release { key: hash(&["stem", poster, &stem]), name: stem, source: "stem", file_total }
}
@@ -947,6 +947,8 @@ mod tests {
let par2 = id(r#"(Geisterjäger John Sinclair Hörspiele Vol. 2) [59/59] - "Hörspiele Vol. 2.par2" yEnc"#, "Hörspiele Vol. 2.par2");
assert_eq!(t1.key, t2.key);
assert_eq!(t1.key, par2.key);
// A cover without words around it joins its stem's archive.
assert_eq!(id(r#"[2/6] - "x.jpg" yEnc"#, "x.jpg").key, id(r#"[1/6] - "x.part01.rar" yEnc"#, "x.part01.rar").key);
}
#[test]