From d23bf04ced4a403ec53e7f0505d0fef9c2a1d84e Mon Sep 17 00:00:00 2001 From: qu1ck Date: Thu, 11 Apr 2024 22:36:05 -0700 Subject: [PATCH] Fix magnet link not recognized as existing if hash is not in lowercase --- src/trutil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trutil.ts b/src/trutil.ts index 028cdd1..9da1caa 100644 --- a/src/trutil.ts +++ b/src/trutil.ts @@ -141,7 +141,7 @@ export function decodeMagnetLink(magnet: string) { }); let hash = params.find((p) => p[0] === "xt")?.[1] ?? ""; - if (hash.startsWith("urn:btih:")) hash = hash.substring(9); + if (hash.startsWith("urn:btih:")) hash = hash.substring(9).toLowerCase(); else hash = ""; const trackers = params