Take the padded volume back out: it merged a dump's versions
Test and deploy / test (push) Successful in 55s
Test and deploy / edge (push) Successful in 2m7s
Test and deploy / deploy (push) Successful in 2m34s

208ca1d's volume of 3-5 digits after a digit (YME's "CHT PCK 2 9.26.001")
also took versions for volumes: "K-ML 3.8.233", "3.8.239", "3.8.241" and
Kaizen's "v2.0.1021" ... "v2.0.1057" became one release (505 names on the
corpus). The random name's volumes with their own extensions stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-14 14:11:03 +02:00
1 parent 208ca1d535
commit eddbe2863f
3 files changed
+11 -14

No files matched your search

+3 -4
View File
@@ -152,8 +152,6 @@ const SCENE_TRACK = /^\d{1,3}[-_ .]+(.+?)(?:_-_| - |-)/
const SCENE_RELEASE = /^(.+?)(?:_-_| - |-).*-(?:web|cd[a-z]?|vinyl|vls|sat|cable|fm|dab|single|ep|lp|promo|bootleg)-.*(?:19|20)\d{2}(?:-[A-Za-z0-9_]+)?$/i
/** A file of a multi-volume upload: a rar part or volume, a par2 (index or volume), a numbered split. */
const RANDOM_VOLUME = /\.(?:part\d+\.rar|vol\d+[+-]\d+\.par2|par2|r\d{2,3}|7z\.\d{3}|zip\.\d{3}|\d{3})$/i
/** A volume number of 3–5 digits after a dot, whatever comes before it ("CHT PCK 2 9.26.001"). */
const PADDED_VOLUME = /^(.*[A-Za-z].*?)\.(\d{3,5})$/
/** A random name's volume with any short extension, or none ("df2BkeRxIvHcWrsWwwz.part01.cer", "….part69.bdmv"). */
const RANDOM_PART = /^(.+)\.part\d{2,}(?:\.[A-Za-z0-9]{1,5})?$/
@@ -490,8 +488,9 @@ export function releaseIdentity(input: ReleaseInput): ReleaseIdentity | null {
// upload the par2 index without a counter, and it belongs to the same post.
// A numbered volume as the extension, within the counter's total ("(????) [0659/2195] - "DN.VPL PCK.1508"",
// "TKY.ASN PCK.691."): the volumes are one upload.
// Also zero-padded after a date ("(????) [0001/1009] - "CHT PCK 2 9.26.001"": 5,419 single files of YME in a.b.pwp).
const volume = VOLUME_NUMBER.exec(stem) ?? PADDED_VOLUME.exec(stem)
// Not after a digit: YME's "CHT PCK 2 9.26.001" looks just like a dump's versions ("K-ML 3.8.233", "… v2.0.1040"), and
// those merged (505 names on the corpus; LOG.md 2026-10-14 (52)).
const volume = VOLUME_NUMBER.exec(stem)
const base = volume && postTotal && Number(volume[2]) <= postTotal ? volume[1] : stem
// Without case and a scene index's "00-" ("00-laura_van_dam_-_capture_radio_113-cable-10-10-2026-talion.m3u" beside
// "Laura_van_Dam_-_Capture_Radio_113-CABLE-10-10-2026-TALiON.par2": one upload, two releases; LOG.md 2026-10-12 (19)).