fix: improve releaseGroup regex (#403)

Co-authored-by: Viren070 <viren070@protonmail.com>
This commit is contained in:
Hugo
2025-09-27 16:39:42 +01:00
committed by GitHub
parent b47c293fd3
commit 2c9c887fae
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ class FileParser {
const getPaddedNumber = (number: number, length: number) =>
number.toString().padStart(length, '0');
const releaseGroup = parsed.group;
const releaseGroup = filename.match(PARSE_REGEX.releaseGroup)?.[1] ?? parsed.group;
const title = parsed.title;
const year = parsed.year ? parsed.year.toString() : undefined;
const season = parsed.season;
+1 -1
View File
@@ -180,5 +180,5 @@ export const PARSE_REGEX: PARSE_REGEX = {
Latino: createLanguageRegex('latino|lat'),
},
releaseGroup:
/- ?(?!\d+$|S\d+|\d+x|ep?\d+|[^[]+]$)([^\-. []+[^\-. [)\]\d][^\-. [)\]]*)(?:\[[\w.-]+])?(?=\.\w{2,4}$|$)/i,
/-[. ]?(?!\d+$|S\d+|\d+x|ep?\d+|[^[]+]$)([^\-. []+[^\-. [)\]\d][^\-. [)\]]*)(?:\[[\w.-]+])?(?=\)|\.\w{2,4}$|$)/i,
};