Identity: a set's number before yEnc is no size; names after an arrow
Test and deploy / test (push) Successful in 49s
Test and deploy / edge (push) Successful in 1m59s
Test and deploy / deploy (push) Successful in 2m6s

- The unit-less size before the closing yEnc ('"x.mp3" - 8123 yEnc') took
  the set number in 'Newstar Destiny I set 1 [1 of 60] "destiny-001-001.jpg"
  yEnc' once the quotes were gone: 97 sets of 60 were one release. A number
  of fewer than 4 digits after a word stays.
- unquotedName also cuts after "-> " ("… -> [0001 of 0076] ->
  Exclusive-tgirls_000000-lg.jpg"): the arrow was part of the file name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-12 06:46:19 +02:00
1 parent 18a146e130
commit e1d21d1e7c
6 files changed
+37 -5

No files matched your search

+4 -1
View File
@@ -338,7 +338,9 @@ pub fn unquoted_name(before_counter: &str) -> Option<String> {
let bracket = text.rfind("] ").map_or(0, |i| i + 2);
// A track or part number (/ - \d{1,3} - /): the name starts there; else after the last " - ".
let dash = first_track(text).or_else(|| text.rfind(" - ")).map_or(0, |i| i + 3);
let name = js::trim(&text[bracket.max(dash)..]);
// Or after an arrow ("… -> Exclusive-tgirls_000000-lg.jpg").
let arrow = text.rfind("-> ").map_or(0, |i| i + 3);
let name = js::trim(&text[bracket.max(dash).max(arrow)..]);
return (!name.is_empty() && has_extension(name)).then(|| name.to_string());
}
text.split(' ').find(|w| has_extension(w)).map(str::to_string)
@@ -910,6 +912,7 @@ mod unquoted_tests {
("A Strange Light from the East - Eastern Influenced Western Music (1965-72) - CD2 - 07 - Rascals - Sattva.mp3 ", Some("07 - Rascals - Sattva.mp3")),
("pal! [Mivina high(1).wmv\" yEnc] ", Some("Mivina high(1).wmv")),
("[03/21 Geroellheimer - S03E16.part01.rar\" yEnc ", Some("Geroellheimer - S03E16.part01.rar")),
("<Group> FP -> {EXL01~P~004} -> Alexia (3) -> VF -> [0001 of 0076] -> Exclusive-tgirls_000000-lg.jpg ", Some("Exclusive-tgirls_000000-lg.jpg")),
("[7w] - 9BbEV2MrTi59GBTEFlVrssBrXNwXf2SK9cQEeDjg yEnc ", None),
("Re: Will somebody answer the question? ", None),
];