From acfb0c58bec25782aa92963cd590a56967229d62 Mon Sep 17 00:00:00 2001 From: Luan Date: Thu, 5 Dec 2024 19:31:43 -0300 Subject: [PATCH] fix(Player): Add more ways to find the nsig algo --- src/core/Player.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/core/Player.ts b/src/core/Player.ts index 4e98547a7..802ad2ae6 100644 --- a/src/core/Player.ts +++ b/src/core/Player.ts @@ -232,10 +232,19 @@ export default class Player { } static extractNSigSourceCode(data: string): string | undefined { - const nsig_function = findFunction(data, { includes: 'enhanced_except' }); - if (nsig_function) { + // This used to be the prefix of the error tag (leaving it here for reference). + let nsig_function = findFunction(data, { includes: 'enhanced_except' }); + + // This is the suffix of the error tag. + if (!nsig_function) + nsig_function = findFunction(data, { includes: '-_w8_' }); + + // Usually, only this function uses these dates in the entire script. + if (!nsig_function) + nsig_function = findFunction(data, { includes: '1969' }); + + if (nsig_function) return `${nsig_function.result} ${nsig_function.name}(nsig);`; - } } get url(): string {