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]
|
||||
|
||||
Reference in new issue
Block a user