Image sets: suffixes that don't count the images go first
The set bound cut at an image name's last number, but in many threads
that's a suffix, so every image was a set ("It does my heart good to see
Red Dog dancing again": 4,683 releases of 4,730 files): a repeat of the
index (katelg010_10), a year (hgrscans1097_2009), a size
(pj02kristina_24of40_1600), an "of" total (24of40). imageSet drops
those, then cuts at the last number (cutie-071-032 stays cutie-071-).
Both implementations; tests; fixtures identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4f48a6d4c
commit
392ff09910
3 files changed
+93
-7
No files matched your search
@@ -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("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 [
|
||||
['stp250x001', 'stp250x'],
|
||||
['cutie-071-032', 'cutie-071-'],
|
||||
['katelg010_10', 'katelg'],
|
||||
['kate112lg035_35', 'kate112lg'],
|
||||
['!!hgrscans1097_2009', '!!hgrscans'],
|
||||
['pj02kristina_24of40_1600', 'pj02kristina_'],
|
||||
['keira_s04_l keira_s04_0040_l', 'keira_s04_l keira_s04_'],
|
||||
['IMG_2676', 'IMG_'],
|
||||
['2877-041', '2877-'],
|
||||
['JimAndJoey Kindly Husband-to-Be', ''],
|
||||
]) assert.equal(imageSet(stem), set, stem)
|
||||
})
|
||||
|
||||
test('dates are no file counters', async ({ assert }) => {
|
||||
const { counterTotal } = await import('#lib/release/identity')
|
||||
assert.isUndefined(counterTotal('Avira AntiVir Rescue System 08-29-2011.rar'))
|
||||
|
||||
Reference in new issue
Block a user