From 38f70b666d22e657cefadfd6f5a177abc7de4071 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:12:12 -0400 Subject: [PATCH] Fix profile state adapter and magnet fallback input --- js/app.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 454ef286..36c9e488 100644 --- a/js/app.js +++ b/js/app.js @@ -3505,7 +3505,9 @@ class Application { persistSavedProfiles: (options) => persistSavedProfiles(options), getActivePubkey: () => this.activeProfilePubkey, setActivePubkey: (pubkey, options) => { - setStoredActiveProfilePubkey(pubkey, options); + this.activeProfilePubkey = + typeof pubkey === "string" && pubkey.trim() ? pubkey.trim() : null; + setStoredActiveProfilePubkey(this.activeProfilePubkey, options); return this.activeProfilePubkey; }, getCachedSelection: () => cache.cachedSelection, @@ -9205,9 +9207,16 @@ class Application { }); } + const magnetInput = + sanitizedMagnet || + decodedMagnetCandidate || + magnetCandidate || + legacyInfoHash || + ""; + await this.playVideoWithFallback({ url: trimmedUrl, - magnet: usableMagnetCandidate, + magnet: magnetInput, }); }