A folder's images posted with their sizes are one release: no image set under the subject
Test and deploy / test (push) Successful in 49s
Test and deploy / edge (push) Successful in 1m59s
Test and deploy / deploy (push) Successful in 1m28s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-16 10:13:20 +02:00
1 parent e154b2896f
commit 7d9a81784e
3 files changed
+73 -3

No files matched your search

+21 -1
View File
@@ -332,6 +332,23 @@ export function runOn(name: string): string {
return name
}
/**
* A name posted unquoted with its size in bytes right after it, at the subject's end ("… Nude Celebrity Pictures <<<<< -
* !index0001.jpg 75220 bytes", "*** NEW *** CTP update & adds - cc_CG2008_v10_01_Stephanie_Emma.jpg - 18441 bytes"):
* a tool that posts a folder under the subject typed for it, file by file. Not a quoted name ("The excellent STIRILING
* SILVER - Always popular - "stp250x001.jpg" yEnc 320794 bytes").
*/
export function sizedName(subject: string, name: string): boolean {
let s = subject.trimEnd()
const unit = /bytes?$/i.exec(s)
if (!unit) return false
s = s.slice(0, unit.index).trimEnd()
const digits = /\d[\d.,]*$/.exec(s)
if (!digits) return false
s = s.slice(0, digits.index).trimEnd().replace(/-$/, '').trimEnd()
return name.length > 0 && s.endsWith(name) && !s.endsWith(`"${name}"`)
}
/** The subject without a number after the file's unquoted name at its end (" - 28": a size in kB). */
export function sizeAfterName(subject: string, name: string): string {
const end = subject.trimEnd()
@@ -419,7 +436,10 @@ export function releaseIdentity(input: ReleaseInput): ReleaseIdentity | null {
// Without a counter an image's set bounds it: its name up to its last number, digits kept ("stp250x001.jpg"
// → "stp250x": STIRILING SILVER's 300 sets were one release of 44k images); a name without numbers names no
// set ("Kindly Husband-to-Be.JPG": a thread of 1,177 releases), so the subject alone (LOG.md 2026-10-12 (2)).
const set = image ? imageSet(stem) : ''
// A folder's images posted with their sizes: the subject names the folder, the images no set (a celebrity's
// scraped pictures, "!index0001.jpg", "00_00_13.jpg", "bboobs02-curtis-jl.jpg", were 219 releases of 1,423 images;
// LOG.md 2026-10-16 (63)).
const set = image && !sizedName(input.subject, input.name) ? imageSet(stem) : ''
const parts: (string | number)[] = ['subject', poster, remainder, total ?? set]
// An upload's random stem on its volumes ("[ TOWN ] [ www town ag ] [ TV ] … "Z3mMTMPsoT4ikE_Di3fKnNF21.part01.rar"",
// "….vol4+4.par2"): under a constant tag every upload of a total was one release (2,338 files for 20; LOG.md