Split zip volumes (.zNN) and .xNN as volumes, but not .x32/.x64/.x86
87e15d8's .[s-v]NN let "Licence 700790900887990.z18" and "….x31" uploads fall apart again (+1,740 releases on the corpus). .zNN is a split zip volume; .xNN is a volume unless it's a build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87e15d810d
commit
8d5385fdec
3 files changed
+25
-6
No files matched your search
@@ -49,8 +49,9 @@ const SUFFIXES = [
|
||||
/** Strips per-file suffixes (volume numbers, archive and par2 extensions) from a filename. */
|
||||
export function fileStem(name: string): string {
|
||||
// Old-style rar volumes after .r99 ("BD_NoTHing018.s41", "….s00", ".t91", ".v81"): only as the file's own extension, in
|
||||
// lower case, so a season ("show.s01.rar", "Show.S01") stays; not x or z (".x64", ".x86" builds; ".z01" goes with .zip).
|
||||
let stem = name.trim().replace(/\.[s-v]\d{2}$/, '')
|
||||
// lower case, so a season ("show.s01.rar", "Show.S01") stays. Split zip volumes (".z18"), and .xNN but not the builds
|
||||
// ".x32", ".x64", ".x86" ("Licence 700790900887990.z18", "….x31"; "….v1.0.142.x64" stays).
|
||||
let stem = name.trim().replace(/\.(?:[s-vz]\d{2}|x(?!32$|64$|86$)\d{2})$/, '')
|
||||
let changed = true
|
||||
while (changed) {
|
||||
changed = false
|
||||
|
||||
Reference in new issue
Block a user