More single-file splits from the re-index
Releases of one file whose counter announces many (910k of 3M after the
sixth reset's first minutes), by cause:
- An unquoted name with double spaces ("lara_bath 15of19 larabath_2.5.jpg",
"Luisa: (068 of 160)"): the subject is collapsed, the name wasn't,
so it stayed in the remainder; it's taken out collapsed too.
- Audiobook and album tracks keyed by their own name ("RP - File 268 of
295 - \"… Seeing A Large Cat - D11.16-22.mp3\"", "CANDYD :: \"Candy
Dulfer - Candy Store - 11 - everytime.mp3\""): by the name without its
numbers, as image sets.
- A size without a unit before the closing yEnc ("…mp3\" - 8123 yEnc").
- Random posters with separators ("SOFZRw1-OTEd@…", "…_OOW@…").
Both implementations; tests; fixtures identical (models: 267 -> 172).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d400822bd
commit
625ea23171
3 files changed
+106
-5
No files matched your search
@@ -194,6 +194,26 @@ test.group('release / par2 names', () => {
|
||||
assert.equal(id(`${album} - 07 - Rascals - Sattva.mp3 (1/43)`).key, id(`${album} - 08 - Incredible String Band - Koeeoaddi There.mp3 (1/47)`).key)
|
||||
})
|
||||
|
||||
test('more splits from the re-index: spaces in unquoted names, audio tracks, sizes before yEnc, posters with separators', async ({ assert }) => {
|
||||
const { parseSubject } = await import('#lib/headers/index')
|
||||
const { randomPoster } = await import('#lib/release/identity')
|
||||
// As the edge worker: the subject without its counter and with collapsed spaces, the name as parsed.
|
||||
const id = (poster: string, subject: string) => {
|
||||
const name = parseSubject(subject)!.name
|
||||
const base = subject.replace(/\(\d+\/\d+\)\s*$/, '').replace(/\s+/g, ' ').trim()
|
||||
return releaseIdentity({ poster, subject: base, name, weak: false })!
|
||||
}
|
||||
const makz = 'Makz@BlueRadiance.uni (makz)'
|
||||
assert.equal(id(makz, 'G:\\posting\\thegoodnudes\\lara_bath 15of19 larabath_2.5.jpg (1/1)').key, id(makz, 'G:\\posting\\thegoodnudes\\lara_bath 16of19 larabath_2.6.jpg (1/1)').key)
|
||||
const mara = 'Mara <guest@cox.net>'
|
||||
assert.equal(id(mara, 'RP - File 268 of 295 - yEnc "Elizabeth Peters - (Peabody 09) Seeing A Large Cat - D11.16-22.mp3" (1/3)').key, id(mara, 'RP - File 269 of 295 - yEnc "Elizabeth Peters - (Peabody 09) Seeing A Large Cat - D11.17-22.mp3" (1/3)').key)
|
||||
const mb = 'misterb@sure.com (MisterB)'
|
||||
assert.equal(id(mb, 'Herb Ernst@256 - NMR -[07/17] "Herb Ernst - Dreamflight II - 05 - The Light of Forever.mp3" - 8123 yEnc (1/9)').key, id(mb, 'Herb Ernst@256 - NMR -[08/17] "Herb Ernst - Dreamflight II - 06 - Other.mp3" - 9001 yEnc (1/9)').key)
|
||||
assert.isTrue(randomPoster('SOFZRw1-OTEd@EEFUbh.srG'))
|
||||
assert.isTrue(randomPoster('vMgGYlZB9ZcTNk8WxYFGV_OOW@x6YR.abc'))
|
||||
assert.isFalse(randomPoster('w.merklein@freenet.de (muffin)'))
|
||||
})
|
||||
|
||||
test('image sets: sizes in brackets and one-word set names', ({ assert }) => {
|
||||
const id = (subject: string, name: string) => releaseIdentity({ poster: 'p', subject, name, weak: false })!
|
||||
assert.equal(id('Aletta Ocean - "100628-035.jpg" yEnc [347K]', '100628-035.jpg').key, id('Aletta Ocean - "100628-036.jpg" yEnc [298K]', '100628-036.jpg').key)
|
||||
|
||||
Reference in new issue
Block a user