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

+16
View File
@@ -222,6 +222,22 @@ test.group('release / par2 names', () => {
assert.equal(mint('JimAndJoey Kindly Husband-to-Be.JPG').key, mint('Oops OnlyOneMore.JPG').key)
})
test("a folder's images posted with their sizes are one release: the subject names it", async ({ assert }) => {
const celeb = (n: string, size: number) =>
releaseIdentity({ poster: '@_CelebMovie_@', subject: `>>>>> Jamie Lee Curtis - Nude Celebrity Pictures <<<<< - ${n} ${size} bytes`, name: n, weak: false })!
const keys = new Set(['!index0001.jpg', '00-00-02_123_842lo.jpg', '00_00_13.jpg', 'bboobs02-curtis-jl.jpg', '0c4_jamie_lee_curtis_15.jpg'].map((n, i) => celeb(n, 75220 + i).key))
assert.equal(keys.size, 1)
assert.equal(celeb('00_00_13.jpg', 58748).source, 'subject')
assert.notEqual(celeb('00_00_13.jpg', 1).key, releaseIdentity({ poster: '@_CelebMovie_@', subject: '>>>>> Carmen Electra - Xmas Nudes <<<<< - 00_00_13.jpg 1 bytes', name: '00_00_13.jpg', weak: false })!.key)
const ctp = (n: string) => releaseIdentity({ poster: 'new@update.org (New CTP update)', subject: `*** NEW *** CTP update & adds - ${n} - 18441 bytes`, name: n, weak: false })!
assert.equal(ctp('cc_CG2008_v10_01_Stephanie_Emma.jpg').key, ctp('cc_CastingCall_LasVegas_01_Kristin_00_Header1.jpg').key)
const { sizedName } = await import('#lib/release/identity')
assert.isTrue(sizedName('x - a.jpg 1,234 Bytes', 'a.jpg'))
assert.isFalse(sizedName('x - "a.jpg" yEnc 320794 bytes', 'a.jpg'))
assert.isFalse(sizedName('x - a.jpg 5 megabytes', 'a.jpg'))
assert.isFalse(sizedName('x - a.jpg yEnc', 'a.jpg'))
})
test("an image's set: suffixes that don't count the images go first", async ({ assert }) => {
const { imageSet } = await import('#lib/release/identity')
for (const [stem, set] of [