Compare commits
No commits in common. "024e0995b501c943ef042aeb12f5aeeae737a511" and "15ed49e783b08ac9b6fab345f91d7632ca0d7f07" have entirely different histories.
024e0995b5
...
15ed49e783
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.7.106",
|
"version": "1.7.105",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -1012,10 +1012,7 @@ export function applyEpisodeTokenToFolderName(folderName: string, episodeToken:
|
|||||||
return episodeToken;
|
return episodeToken;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Match single episodes (S01E03), multi-episodes (S01E01E02), and
|
const episodeRe = /(^|[._\-\s])s\d{1,2}e\d{1,3}(?:e\d{1,3})?(?=[._\-\s]|$)/i;
|
||||||
// episode ranges (S01E01-E08, S01E01-08) so the range is fully replaced
|
|
||||||
// with the source's specific episode token.
|
|
||||||
const episodeRe = /(^|[._\-\s])s\d{1,2}e\d{1,3}(?:e\d{1,3})?(?:[-]e?\d{1,3})?(?=[._\-\s]|$)/i;
|
|
||||||
if (episodeRe.test(trimmed)) {
|
if (episodeRe.test(trimmed)) {
|
||||||
return trimmed.replace(episodeRe, `$1${episodeToken}`);
|
return trimmed.replace(episodeRe, `$1${episodeToken}`);
|
||||||
}
|
}
|
||||||
@ -1088,17 +1085,6 @@ export function buildAutoRenameBaseName(folderName: string, sourceFileName: stri
|
|||||||
? applyEpisodeTokenToFolderName(normalizedFolderName, episodeToken)
|
? applyEpisodeTokenToFolderName(normalizedFolderName, episodeToken)
|
||||||
: normalizedFolderName;
|
: normalizedFolderName;
|
||||||
|
|
||||||
// If the folder contains an episode RANGE (e.g. S01E01-E08), replace the
|
|
||||||
// range with the source's specific episode token. Without this, all
|
|
||||||
// episodes in a range-named folder share the same target name, producing
|
|
||||||
// (2)(3)(4) suffixes during MKV collection.
|
|
||||||
if (!isLegacy4sf4sjFolder && isSceneGroupFolder) {
|
|
||||||
const episodeRangeRe = /(^|[._\-\s])s\d{1,2}e\d{1,3}[-]e?\d{1,3}(?=[._\-\s]|$)/i;
|
|
||||||
if (episodeRangeRe.test(normalizedFolderName)) {
|
|
||||||
next = applyEpisodeTokenToFolderName(normalizedFolderName, episodeToken);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const hasRepackHint = sourceHasRpToken(normalizedSourceFileName)
|
const hasRepackHint = sourceHasRpToken(normalizedSourceFileName)
|
||||||
|| SCENE_REPACK_TOKEN_RE.test(normalizedSourceFileName)
|
|| SCENE_REPACK_TOKEN_RE.test(normalizedSourceFileName)
|
||||||
|| sourceHasRpToken(normalizedFolderName)
|
|| sourceHasRpToken(normalizedFolderName)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user