Under a constant subject: an upload's random volume stem, and an image's set head
Test and deploy / test (push) Successful in 51s
Test and deploy / edge (push) Successful in 1m57s
Test and deploy / deploy (push) Successful in 2m27s

- "[ TOWN ] [ www town ag ] [ TV ] … "Z3mMTMPsoT4ikE_Di3fKnNF21.part01.rar"",
  "….vol4+4.par2": the subject and the total were the key, so every upload of
  a total was one release (2,338 files for 20; also partner-of-ssl-news,
  brothers-of-usenet). A random stem (no dots or spaces) on a volume file
  joins the subject key; a scene name doesn't, so its nfo stays.
- "Molly Set [i/50] "mo103x003.jpg"": every set of 50 was one. An image's
  name up to its first number, when another follows, joins the key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-14 09:12:17 +02:00
1 parent 9f255e6ac0
commit f1c5af5f36
3 files changed
+53 -3

No files matched your search

+12 -1
View File
@@ -150,6 +150,8 @@ const HASHED = /^(?:[0-9a-f]{8,}(?:_[0-9a-f]{6,}){2,}|[0-9a-f]{24,})(?:-[0-9a-z]
const SCENE_TRACK = /^\d{1,3}[-_ .]+(.+?)(?:_-_| - |-)/
/** A scene music release's name: the artist, then its source (web, cd, vinyl, …) and the year, last the group. */
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
const VOLUME_NUMBER = /^(.*[^\d. ])[. ](\d{1,5})\.?$/
/** Image files: a set's images are named one by one ("IMG_3086.jpg"); its subject names the set. */
@@ -405,8 +407,17 @@ export function releaseIdentity(input: ReleaseInput): ReleaseIdentity | null {
// → "stp250x": STIRILING SILVER's 300 sets were one release of 44k images); a name without numbers names no
// set ("Kindly Husband-to-Be.JPG": a thread of 1,177 releases), so the subject alone (LOG.md 2026-10-12 (2)).
const set = image ? imageSet(stem) : ''
const parts: (string | number)[] = ['subject', poster, remainder, total ?? set]
// An image's set as well under a counter ("Molly Set" [i/50]: "mo103x003.jpg", "mop120x032.jpg": every set of 50 one release):
// its name up to its first number, when another follows ("mo103", "destiny-001"; not "IMG_2307", one number an image).
const head = image && total !== undefined ? /^(\D*\d+)\D+\d+/.exec(stem) : null
if (head) parts.push(head[1])
// An upload's random stem on its volumes ("[ TOWN ] [ www town ag ] [ TV ] … "Z3mMTMPsoT4ikE_Di3fKnNF21.part01.rar"",
// "….vol4+4.par2"): under a constant tag every upload of a total was one release (2,338 files for 20; LOG.md
// 2026-10-14 (51)). No dots or spaces: a scene name ("The.Big.Bang.Theory.S01E01") isn't random.
if (!image && RANDOM_VOLUME.test(input.name) && /^[A-Za-z0-9_-]+$/.test(stem) && looksRandom(stem.replace(/[-_]/g, ''))) parts.push(stem)
return {
key: hash('subject', poster, remainder, total ?? set),
key: hash(...parts),
name: remainder,
fileTotal,
source: 'subject',