From f94d9548a6c43d11103c33f1a59103157b2b3440 Mon Sep 17 00:00:00 2001 From: aka paul <50n50@noreply.localhost> Date: Sun, 8 Mar 2026 17:31:20 +0000 Subject: [PATCH] Update comet/comet.js --- comet/comet.js | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/comet/comet.js b/comet/comet.js index 395d406..32ad82c 100644 --- a/comet/comet.js +++ b/comet/comet.js @@ -6,7 +6,7 @@ const cachedOnly = false; // [true, false] const removeTrash = true; // [true, false] const resultFormat = "all"; // ["all"] const debridService = "realdebrid"; // ["realdebrid", "alldebrid", "premiumize", "torbox", "debridlink"] -const debridApiKey = ""; +const debridApiKey = "DAD4OJCOD46VAWYXIFFZ6YXNAVJ4NOTL32GIPRLVMXW4U32BGAMQ"; const debridStreamProxyPassword = ""; const languagesExclude = ""; const languagesPreferred = "en"; @@ -15,6 +15,36 @@ const allowEnglishInLanguages = false; // [true, false] const removeUnknownLanguages = false; // [true, false] // Settings end +function btoa(str) { + if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function" && globalThis.btoa !== btoa) { + return globalThis.btoa(str); + } + + if (typeof Buffer !== "undefined") { + return Buffer.from(str, "utf8").toString("base64"); + } + + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + let result = ""; + let i = 0; + + while (i < str.length) { + const byte1 = str.charCodeAt(i++) & 0xff; + const hasByte2 = i < str.length; + const byte2 = hasByte2 ? str.charCodeAt(i++) & 0xff : 0; + const hasByte3 = i < str.length; + const byte3 = hasByte3 ? str.charCodeAt(i++) & 0xff : 0; + + const chunk = (byte1 << 16) | (byte2 << 8) | byte3; + result += chars[(chunk >> 18) & 63]; + result += chars[(chunk >> 12) & 63]; + result += hasByte2 ? chars[(chunk >> 6) & 63] : "="; + result += hasByte3 ? chars[chunk & 63] : "="; + } + + return result; +} + async function searchResults(keyword) { try { const moviesresponse = await fetchv2( @@ -186,8 +216,8 @@ async function extractStreamUrl(ID) { try { const endpoint = type === "movie" - ? "https://comet.elfhosted.com/" + encodedConfig + "/stream/movie/" + actualID + ".json" - : "https://comet.elfhosted.com/" + encodedConfig + "/stream/series/" + actualID + ".json"; + ? "https://comet.feels.legal/" + encodedConfig + "/stream/movie/" + actualID + ".json" + : "https://comet.feels.legal/" + encodedConfig + "/stream/series/" + actualID + ".json"; const response = await fetchv2(endpoint); const data = await response.json();