Hosts and sponsors without a counter name no upload
"(www.Thunder-News.org) >XXX< <Sponsored by Secretusenet> - "ps-itb10b.r00"" has no counter to bound it, so a poster's uploads were one subject release (1,135 files). Without a counter the remainder drops www hosts and "Sponsored by X"; what's left names the release or the stem does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cdc1cdc0cc
commit
6d301fc668
3 files changed
+47
-2
No files matched your search
@@ -131,6 +131,8 @@ function hash(...parts: (string | number | undefined)[]) {
|
||||
const DATE_LED = /^\d{1,2}[-._]\d{1,2}[-._](?:19|20)\d{2}(?!\d)/
|
||||
const VIDEO = /\.(mkv|mp4|avi|m4v|ts|wmv|mov)$/i
|
||||
const EPISODE = /^(.+?)[ ._-]+S(\d{1,2})E\d{1,3}/i
|
||||
/** A host and a sponsor in a subject's remainder (its dots and dashes spaces): "(www Thunder News org)", "<Sponsored by Secretusenet>". */
|
||||
const BOILERPLATE = /\(?\bwww(?: [A-Za-z0-9]+)*? (?:org|com|net|info|nl|de|eu|to|biz|us)\b\)?|<?\bsponsored by [A-Za-z0-9]+>?/gi
|
||||
const HASHED = /^[0-9a-f]{8,}(?:_[0-9a-f]{6,}){2,}(?:-[0-9a-z]+)?$/i
|
||||
const SCENE_TRACK = /^\d{1,3}[-_ .]+(.+?)(?:_-_| - |-)/
|
||||
const VOLUME_NUMBER = /^(.*[^\d. ])[. ](\d{1,5})\.?$/
|
||||
@@ -307,10 +309,15 @@ export function releaseIdentity(input: ReleaseInput): ReleaseIdentity | null {
|
||||
.replace(/(\[\d+\/\d+\])\s*-\s*\[\d+\]/g, '$1')
|
||||
// A per-file hex id in brackets ("[PRiVATE] Rosewood.S02E08… [1f1793f68d5321] [newzNZB] [01/22]": 32,101 single files).
|
||||
.replace(/\[[0-9a-f]{8,}\]/gi, ' ')
|
||||
const remainder = subjectRemainder(named)
|
||||
// Counted without the file name, as quoted names are: "shyla-shy-09-0195.jpg hardcore …" is no "9 of 195"
|
||||
// (each of 866 images was a release of its own; LOG.md 2026-10-12 (5)).
|
||||
const fileTotal = counterTotal(named)
|
||||
// Without a counter a host and a sponsor name no upload ("(www.Thunder-News.org) >XXX< <Sponsored by Secretusenet> -
|
||||
// "ps-itb10b.r00"": with no total to bound them, a poster's uploads were one release of 1,135 files; LOG.md 2026-10-12 (23)).
|
||||
const remainder =
|
||||
fileTotal === undefined
|
||||
? subjectRemainder(named).replace(BOILERPLATE, ' ').replace(/ {2,}/g, ' ').trim()
|
||||
: subjectRemainder(named)
|
||||
// A document or comic is a release of its own (collections post hundreds under one subject).
|
||||
if (DOCUMENT.test(input.name)) return { key: hash('stem', poster, stem), name: stem.replace(DOCUMENT, '') || stem, fileTotal, source: 'stem' }
|
||||
const image = IMAGE.test(input.name)
|
||||
|
||||
Reference in new issue
Block a user