mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 17:32:26 +00:00
Ensure channel grid cards trigger playback
This commit is contained in:
1 parent
814bb65ffe
commit
7070eea35e
1 file changed
+13
@@ -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
|
||||
|
||||
Reference in new issue
Block a user