A date alone isn't an unquoted name; an image under a post token keys by the post
- "Ballers.2014.S01E01.HDTV.x264-KILLERS[ettv] 15_07_2015.rar", "Computer Bild - Ausgabe 152015 - 15_07_2015.rar": the cut after "] " or " - " left "15_07_2015.rar" for every item of a Razor1911 dump (1,335 files for 12); a date alone after the cut means the whole text is the name. - "MDG005b - (01/90) "IMG_2307.JPG"": a counter in parentheses makes no post key, so every "IMG" set of the poster was one (609 for 90); an image under a post token is keyed by it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
590436d02a
commit
229189f35c
6 files changed
+39
-4
No files matched your search
@@ -45,6 +45,8 @@ export function nameBesideQuotes(quoted: string, beforeCounter: string): string
|
||||
return name && EXTENSION.test(name) ? name : null
|
||||
}
|
||||
|
||||
/** A file name that is a date alone ("15_07_2015.rar"). */
|
||||
const DATE_ONLY = /^(?:\d{1,2}[-_.]\d{1,2}[-_.](?:19|20)\d{2}|(?:19|20)\d{2}[-_.]\d{1,2}[-_.]\d{1,2})\.[A-Za-z0-9]{2,4}$/
|
||||
const IMAGE_NAME = /\.(jpe?g|png|gif|bmp|webp|tiff?)$/i
|
||||
/** A host ("www.libranews.nl", "www.x2l.nl"): its ".nl" is no extension. */
|
||||
const HOST = /www\./i
|
||||
@@ -77,7 +79,9 @@ export function unquotedName(beforeCounter: string): string | null {
|
||||
// Or after an arrow ("… -> [0001 of 0076] -> Exclusive-tgirls_000000-lg.jpg").
|
||||
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()
|
||||
// A date alone after the cut ("Ballers.2014.S01E01.HDTV.x264-KILLERS[ettv] 15_07_2015.rar", "Computer Bild - Ausgabe
|
||||
// 152015 - 15_07_2015.rar": a dump's every item was "15_07_2015.rar"; LOG.md 2026-10-13 (42)): the whole text is the name.
|
||||
const name = DATE_ONLY.test(text.slice(cut).trim()) ? text.trim() : 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(' ')) {
|
||||
|
||||
Reference in new issue
Block a user