fix(crunchy): fixed ScaledBorderAndShadowFix

This commit is contained in:
stratumadev 2026-02-15 14:08:23 +01:00
parent 7304e0d907
commit acffb74220
3 changed files with 570 additions and 35 deletions

View file

@ -2956,11 +2956,16 @@ export default class Crunchy implements ServiceClass {
sBody = sBody.replace(/^(PlayResY:\s*\d+)/m, `$1\nLayoutResX: ${playResX}\nLayoutResY: ${playResY}`); sBody = sBody.replace(/^(PlayResY:\s*\d+)/m, `$1\nLayoutResX: ${playResX}\nLayoutResY: ${playResY}`);
} }
// ScaleBorderAndShadow Fix // ScaleBorderAndShadow Fix (True and doesn't exist)
if (options.scaledBorderAndShadowFix && !sBody.includes('ScaledBorderAndShadow')) { if (options.scaledBorderAndShadowFix && !sBody.includes('ScaledBorderAndShadow')) {
sBody = sBody.replace(/^(WrapStyle:.*)$/m, `$1\nScaledBorderAndShadow: ${options.scaledBorderAndShadow}`); sBody = sBody.replace(/^(WrapStyle:.*)$/m, `$1\nScaledBorderAndShadow: ${options.scaledBorderAndShadow}`);
} }
// ScaleBorderAndShadow Fix (True and exists)
if (options.scaledBorderAndShadowFix && sBody.includes('ScaledBorderAndShadow')) {
sBody = sBody.replace(/ScaledBorderAndShadow:\s*(yes|no)/, `ScaledBorderAndShadow: ${options.scaledBorderAndShadow}`);
}
// Fix VLC wrong parsing if URL not avaiable // Fix VLC wrong parsing if URL not avaiable
if (options.originalScriptFix) { if (options.originalScriptFix) {
sBody = sBody.replace(/^Original Script:.*$/gm, 'Original Script: Crunchyroll'); sBody = sBody.replace(/^Original Script:.*$/gm, 'Original Script: Crunchyroll');

View file

@ -52,7 +52,7 @@
"mpd-parser": "^1.3.1", "mpd-parser": "^1.3.1",
"node-playready": "^1.1.2", "node-playready": "^1.1.2",
"open": "^11.0.0", "open": "^11.0.0",
"undici": "^7.21.0", "undici": "^7.22.0",
"widevine": "^1.0.3", "widevine": "^1.0.3",
"ws": "^8.19.0", "ws": "^8.19.0",
"yaml": "^2.8.2" "yaml": "^2.8.2"
@ -63,11 +63,11 @@
"@eslint/js": "^9.39.2", "@eslint/js": "^9.39.2",
"@types/express": "^5.0.6", "@types/express": "^5.0.6",
"@types/m3u8-parser": "^7.2.6", "@types/m3u8-parser": "^7.2.6",
"@types/node": "^25.2.2", "@types/node": "^25.2.3",
"@types/ws": "^8.18.1", "@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.54.0", "@typescript-eslint/eslint-plugin": "^8.55.0",
"@typescript-eslint/parser": "^8.54.0", "@typescript-eslint/parser": "^8.55.0",
"@yao-pkg/pkg": "^6.12.0", "@yao-pkg/pkg": "^6.13.1",
"esbuild": "0.26.0", "esbuild": "0.26.0",
"eslint": "^9.39.2", "eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
@ -77,7 +77,7 @@
"removeNPMAbsolutePaths": "^3.0.1", "removeNPMAbsolutePaths": "^3.0.1",
"ts-node": "^10.9.2", "ts-node": "^10.9.2",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"typescript-eslint": "^8.54.0" "typescript-eslint": "^8.55.0"
}, },
"scripts": { "scripts": {
"prestart": "pnpm run tsc test", "prestart": "pnpm run tsc test",

File diff suppressed because it is too large Load diff