Identity: other quoted text, text separators, ids in image names, more
Test and deploy / test (push) Successful in 49s
Test and deploy / edge (push) Successful in 2m0s
Test and deploy / deploy (push) Successful in 2m1s

- Quoted text other than the file name stays in the remainder: ">>> CREATIVE
  COMMONS NZB <<< "0190 alarm 5.0 " - File 1 of 9: "…rar"" made 12,605
  files of all uploads one release.
- namesRelease accepts words joined by , & : ; \ / + ("Posting & deleting,
  read 0 file "E:\VladModels\y038_Irina\185" …"): such image sets fell to
  the stem rule ("P8250001.JPG"), one release over all folders.
- imageSet: a 5+ digit number left in the set is a per-image id
  ("sss-70556-3474182-23-10825418-pc", "Alena p 26663_…"): no set. Copy
  markers may repeat ("diana-050-052[1][1]").
- unquotedName: an image after numbered text without a separator is the
  last word ("<abm> … AB: part2 0573-1002 043.jpg").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-12 07:51:21 +02:00
1 parent e1d21d1e7c
commit 3fc38edda8
6 files changed
+84 -18

No files matched your search

+9
View File
@@ -41,6 +41,8 @@ export function nameBesideQuotes(quoted: string, beforeCounter: string): string
return name && EXTENSION.test(name) ? name : null
}
const IMAGE_NAME = /\.(jpe?g|png|gif|bmp|webp|tiff?)$/i
export function unquotedName(beforeCounter: string): string | null {
let text = beforeCounter.trimEnd()
if (/yenc$/i.test(text)) text = text.slice(0, -4).trimEnd()
@@ -67,6 +69,13 @@ export function unquotedName(beforeCounter: string): string | null {
const arrow = text.lastIndexOf('-> ')
const cut = Math.max(bracket === -1 ? 0 : bracket + 2, dash === -1 ? 0 : dash + 3, arrow === -1 ? 0 : arrow + 3)
const name = text.slice(cut).trim()
// An image after numbered text without a separator: its last word ("<abm> … AB: part2 0573-1002 043.jpg"; the whole
// subject was the name, so each image a release). Not an index alone ("Teen Tease Self Shooter sad1 (10).jpg").
if (cut === 0 && IMAGE_NAME.test(name) && name.includes(' ')) {
const space = name.lastIndexOf(' ')
const last = name.slice(space + 1)
if (/\d$/.test(name.slice(0, space).trimEnd()) && !last.startsWith('(')) return last
}
return name && EXTENSION.test(name) ? name : null
}
for (const word of text.split(' ')) if (EXTENSION.test(word)) return word