Subject names lose the brackets the counters left unmatched
A poster's counter without its "[" ("… Facialized 002/477] - 0177.jpg")
left "… Facialized ]" as the release name (11286967). displayName (TS) and
display_name (Rust) drop unmatched brackets from subject and post names
only; the identity key keeps the remainder as it was, so no release splits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6f9409e7f
commit
3f0b5b8be1
4 files changed
+90
-6
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { test } from '@japa/runner'
|
||||
import { fileStem, releaseIdentity, runOn, sizeAfterName, subjectRemainder } from '#lib/release/index'
|
||||
import { displayName, fileStem, releaseIdentity, runOn, sizeAfterName, subjectRemainder } from '#lib/release/index'
|
||||
import { looksLikeFilename, weakFileKey } from '#lib/headers/index'
|
||||
|
||||
test.group('release / fileStem', () => {
|
||||
@@ -604,3 +604,15 @@ test.group('release / par2 names', () => {
|
||||
assert.equal(id('[2/6] - "x.jpg" yEnc', 'x.jpg').key, id('[1/6] - "x.part01.rar" yEnc', 'x.part01.rar').key)
|
||||
})
|
||||
})
|
||||
|
||||
test.group('release / displayName', () => {
|
||||
test('brackets the counters left unmatched leave the name, the key keeps them', ({ assert }) => {
|
||||
const subject = (i: number) => `Babe with Plump Bubble Butt Fucked and Facialized ${String(i).padStart(3, '0')}/477] - 0${176 + i}.jpg`
|
||||
const id = (i: number) => releaseIdentity({ poster: 'webmaster@hdbangvidz.com (Porn4You)', weak: false, subject: subject(i), name: `0${176 + i}.jpg` })!
|
||||
assert.equal(id(2).name, 'Babe with Plump Bubble Butt Fucked and Facialized')
|
||||
assert.equal(id(2).key, id(3).key)
|
||||
assert.equal(displayName('[Group] Show (2020)'), '[Group] Show (2020)')
|
||||
assert.equal(displayName('( Show [x] name'), 'Show [x] name')
|
||||
assert.equal(displayName(']'), ']')
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user