SCENE_RELEASE only for a track post's lower-case name
7ad4b70 also keyed rar uploads by artist and total: "VA - Best Of Shamania
Pro 2K16-(SHB 006)-WEB-2016-ZzZz" became 140 files for 20, Ace_Of_Base 72
for 12. Those group by their full name; only a name without capitals or
spaces (Meow's "blaise_mc-in_hellstill_3-ep-web-2022-known.par2") joins
the tracks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7ad4b70775
commit
590436d02a
3 files changed
+14
-2
No files matched your search
+6
-1
@@ -831,7 +831,8 @@ pub fn release_identity(poster: &str, subject: &str, name: &str) -> Release {
|
||||
}
|
||||
}
|
||||
// And its par2 and sfv under the release's own name ("blaise_mc-in_hellstill_3-ep-web-2022-known.par2").
|
||||
if !test(&AUDIO, name) {
|
||||
// Only a track post's lower-case name: a rar upload groups by its full name.
|
||||
if !test(&AUDIO, name) && !stem.chars().any(|c| c.is_ascii_uppercase() || js::is_space(c)) {
|
||||
if let Some(c) = SCENE_RELEASE.captures(stem.as_bytes()) {
|
||||
let artist = String::from_utf8(c[1].to_vec()).unwrap();
|
||||
return Release { key: hash(&["stem", poster, &artist, &total.to_string()]), name: artist, source: "stem", file_total };
|
||||
@@ -1607,6 +1608,10 @@ mod image_set_tests {
|
||||
assert_eq!(blaise("07", "blaise_mc-in_hellstill_3-ep-web-2022-known.par2").key, blaise("03", "00-blaise_mc-in_hellstill_3-ep-web-2022.nfo").key);
|
||||
assert_eq!(blaise("09", "blaise_mc-in_hellstill_3-ep-web-2022-known.vol000+01.par2").key, blaise("05", "01-blaise_mc-intro.mp3").key);
|
||||
assert_eq!(blaise("01", "Some.Movie.2010.1080p.BluRay.x264-GRP.par2").name, "Some.Movie.2010.1080p.BluRay.x264-GRP");
|
||||
assert_ne!(
|
||||
blaise("01", "Ace_Of_Base-Wheel_Of_Fortune-(861_545-2)-CDM-FLAC-1992-REETKEVER.par2").key,
|
||||
blaise("01", "Ace_Of_Base-Other-(861_546-2)-CDM-FLAC-1993-REETKEVER.par2").key
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -424,7 +424,9 @@ export function releaseIdentity(input: ReleaseInput): ReleaseIdentity | null {
|
||||
if (sceneIndex) return { key: hash('stem', poster, sceneIndex[1], postTotal), name: sceneIndex[1], fileTotal, source: 'stem' }
|
||||
// And its par2 and sfv under the release's own name ("[07/14] - "blaise_mc-in_hellstill_3-ep-web-2022-known.par2"": the
|
||||
// par2 of 1,900 Meow and Cat posts was a release apart; LOG.md 2026-10-13 (40)), when the name reads as a scene music release.
|
||||
const sceneRelease = postTotal && !AUDIO.test(input.name) ? SCENE_RELEASE.exec(stem) : null
|
||||
// Only a track post's lower-case name: a rar upload ("VA - Best Of Shamania Pro 2K16-(SHB 006)-WEB-2016-ZzZz.part01.rar",
|
||||
// "Ace_Of_Base-…-CDM-FLAC-1992-REETKEVER.par2") groups by its full name, and by artist and total its albums merged.
|
||||
const sceneRelease = postTotal && !AUDIO.test(input.name) && !/[A-Z\s]/.test(stem) ? SCENE_RELEASE.exec(stem) : null
|
||||
if (sceneRelease) return { key: hash('stem', poster, sceneRelease[1], postTotal), name: sceneRelease[1], fileTotal, source: 'stem' }
|
||||
// An image without words around it: its set by its name (keyed as a stem, so "x.jpg" joins "x.part01.rar").
|
||||
// Keyed by its set when its name has one ("##[ "diana-040-001.jpg" (01/68)": all of a poster's 263 diana sets were
|
||||
|
||||
@@ -390,6 +390,11 @@ test.group('release / par2 names', () => {
|
||||
const blaise = (i: string, n: string) => id(`[${i}/14] - "${n}" yEnc`, n)
|
||||
assert.equal(blaise('07', 'blaise_mc-in_hellstill_3-ep-web-2022-known.par2').key, blaise('03', '00-blaise_mc-in_hellstill_3-ep-web-2022.nfo').key)
|
||||
assert.equal(blaise('09', 'blaise_mc-in_hellstill_3-ep-web-2022-known.vol000+01.par2').key, blaise('05', '01-blaise_mc-intro.mp3').key)
|
||||
// A rar upload keeps its full name: albums by artist and total would merge.
|
||||
const hou = (i: string, n: string) => id(`[${i}/20] - "${n}" - 181.46 MB www.house-of-usenet.com yEnc`, n)
|
||||
assert.notEqual(hou('03', 'VA - Best Of Shamania Pro 2K16-(SHB 006)-WEB-2016-ZzZz.part01.rar').key, hou('03', 'VA - Other Album-(SHB 007)-WEB-2016-ZzZz.part01.rar').key)
|
||||
assert.equal(blaise('01', 'Ace_Of_Base-Wheel_Of_Fortune-(861_545-2)-CDM-FLAC-1992-REETKEVER.par2').key, blaise('02', 'Ace_Of_Base-Wheel_Of_Fortune-(861_545-2)-CDM-FLAC-1992-REETKEVER.part1.rar').key)
|
||||
assert.notEqual(blaise('01', 'Ace_Of_Base-Wheel_Of_Fortune-(861_545-2)-CDM-FLAC-1992-REETKEVER.par2').key, blaise('01', 'Ace_Of_Base-Other-(861_546-2)-CDM-FLAC-1993-REETKEVER.par2').key)
|
||||
// A film isn't a scene music release.
|
||||
assert.equal(blaise('01', 'Some.Movie.2010.1080p.BluRay.x264-GRP.par2').source, 'stem')
|
||||
assert.equal(blaise('01', 'Some.Movie.2010.1080p.BluRay.x264-GRP.par2').name, 'Some.Movie.2010.1080p.BluRay.x264-GRP')
|
||||
|
||||
Reference in new issue
Block a user