From 7070eea35ec1b6ee9eaa78cbd8464597133bfb93 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 7 Oct 2025 19:12:48 -0400 Subject: [PATCH] Ensure channel grid cards trigger playback --- js/channelProfile.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/channelProfile.js b/js/channelProfile.js index d20db4cf..396b6a50 100644 --- a/js/channelProfile.js +++ b/js/channelProfile.js @@ -1824,6 +1824,11 @@ async function loadUserVideos(pubkey) { } else if (cardEl.dataset.ownerPubkey) { delete cardEl.dataset.ownerPubkey; } + if (typeof video.id === "string" && video.id) { + cardEl.dataset.videoId = video.id; + } else if (cardEl.dataset.videoId) { + delete cardEl.dataset.videoId; + } const rawMagnet = typeof video.magnet === "string" ? video.magnet : ""; @@ -1933,6 +1938,14 @@ async function loadUserVideos(pubkey) { delete cardEl.dataset.magnet; } + if (trimmedUrl) { + cardEl.dataset.playUrl = encodeURIComponent(trimmedUrl); + } else if (cardEl.dataset.playUrl) { + delete cardEl.dataset.playUrl; + } + + cardEl.dataset.playMagnet = playbackMagnet || ""; + // Leave the data-play-* attributes empty in the template markup so the raw // URL/magnet strings can be assigned after parsing without HTML entity // escaping, keeping this renderer consistent with app.js. The stored URL is