Fix playback dataset handling for raw magnets

This commit is contained in:
thePR0M3TH3AN committed 2025-09-25 06:58:30 -04:00
1 parent b617648136
commit 447aea3d4b
3 files changed
+20 -9

No files matched your search

+7 -1
View File
@@ -419,7 +419,13 @@ class SubscriptionsManager {
const interactiveEls = cardEl.querySelectorAll("[data-video-id]");
interactiveEls.forEach((el) => {
if (!el.dataset) return;
el.dataset.playUrl = encodeURIComponent(playbackUrl || "");
if (trimmedUrl) {
el.dataset.playUrl = encodeURIComponent(trimmedUrl);
} else {
delete el.dataset.playUrl;
}
el.dataset.playMagnet = playbackMagnet || "";
});