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

+3 -3
View File
@@ -984,7 +984,7 @@ class bitvidApp {
const handler = async (event) => {
const trigger = event.target.closest(
"[data-play-url], [data-play-magnet]"
"[data-play-magnet],[data-play-url]"
);
if (!trigger) {
return;
@@ -1012,13 +1012,13 @@ class bitvidApp {
}
}
const magnet = safeDecodeMagnet(rawMagnetValue) || rawMagnetValue;
const magnet = typeof rawMagnetValue === "string" ? rawMagnetValue : "";
const eventId = trigger.getAttribute("data-video-id");
if (eventId) {
await this.playVideoByEventId(eventId);
} else {
await this.playVideoWithoutEvent({ url, magnet });
await this.playVideoWithFallback({ url, magnet });
}
}
};