More per-file suffixes: old rar volumes, .rev, a part's par2, .bc; a size after an unquoted name
Each file of these uploads was a release of its own: - "BD_NoTHing018.s41", "…CyjI.s00": rar volumes after .r99 (as the file's own lower-case extension only, so "show.s01.rar" keeps its season); - "chappelle1.part02.rev": rar recovery volumes; - "X.part1.par2", "X.part1.vol00+34.par2" beside "X.part1.rar"; - "NZPEC….180.bc": BCArchive volumes; - "[27/70] - 2407.jpg - 28": the size in kB after an unquoted name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2823d42bfa
commit
d4e53ca0d8
4 files changed
+127
-17
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { test } from '@japa/runner'
|
||||
import { fileStem, releaseIdentity, subjectRemainder } from '#lib/release/index'
|
||||
import { fileStem, releaseIdentity, sizeAfterName, subjectRemainder } from '#lib/release/index'
|
||||
import { looksLikeFilename, weakFileKey } from '#lib/headers/index'
|
||||
|
||||
test.group('release / fileStem', () => {
|
||||
@@ -298,6 +298,25 @@ test.group('release / par2 names', () => {
|
||||
assert.equal(b.name, 'Laura_van_Dam_-_Capture_Radio_113-CABLE-10-10-2026-TALiON')
|
||||
})
|
||||
|
||||
test('old rar volumes, recovery volumes, a part\'s par2, BCArchive volumes; a size after an unquoted name', ({ assert }) => {
|
||||
assert.equal(fileStem('BD_NoTHing018.s41'), 'BD_NoTHing018')
|
||||
assert.equal(fileStem('x8ZRmX5N83mrokOwqJtoIGHTrqXQrgCyj.s00'), 'x8ZRmX5N83mrokOwqJtoIGHTrqXQrgCyj')
|
||||
// A season stays.
|
||||
assert.equal(fileStem('the.office.us.s01.rar'), 'the.office.us.s01')
|
||||
assert.equal(fileStem('Some.Show.S01'), 'Some.Show.S01')
|
||||
assert.equal(fileStem('chappelle1.part02.rev'), 'chappelle1')
|
||||
assert.equal(fileStem('chappelle1.rev'), 'chappelle1')
|
||||
assert.equal(fileStem('VwE3i90MVX9dqMFuDfzdS7Q6.part1.par2'), 'VwE3i90MVX9dqMFuDfzdS7Q6')
|
||||
assert.equal(fileStem('VwE3i90MVX9dqMFuDfzdS7Q6.part1.vol00+34.par2'), 'VwE3i90MVX9dqMFuDfzdS7Q6')
|
||||
assert.equal(fileStem('Movie.Part1.mkv'), 'Movie.Part1')
|
||||
assert.equal(fileStem('NZPECQUztWOponTpCratvvTPDBXBjvHIULOUPvSH.180.bc'), 'NZPECQUztWOponTpCratvvTPDBXBjvHIULOUPvSH')
|
||||
assert.equal(sizeAfterName('(Hot MILF getting banged hard)[27/70] - 2407.jpg - 28', '2407.jpg'), '(Hot MILF getting banged hard)[27/70] - 2407.jpg')
|
||||
assert.equal(sizeAfterName('Show [01/10] - "a.jpg" - 28', 'a.jpg'), 'Show [01/10] - "a.jpg" - 28')
|
||||
assert.equal(sizeAfterName('Show - Episode 05', 'x.mkv'), 'Show - Episode 05')
|
||||
const milf = (i: string, n: string, kb: string) => releaseIdentity({ poster: 'p', subject: `(Hot MILF getting banged hard)[${i}/70] - ${n} - ${kb}`, name: n, weak: false })!
|
||||
assert.equal(milf('27', '2407.jpg', '28').key, milf('28', '2408.jpg', '31').key)
|
||||
})
|
||||
|
||||
test("split rar volumes; a file's size in brackets after its counter", ({ assert }) => {
|
||||
assert.equal(fileStem('rld-gtre.r13.002'), 'rld-gtre')
|
||||
const k = (i: number, size: number, n: string) =>
|
||||
|
||||
Reference in new issue
Block a user