Merge pull request #1552 from PR0M3TH3AN/fix-video-modal-share-button-8912381817946423114

Fix video modal share button logic
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-22 23:56:04 -05:00
commit 053d9fd60b
2 files changed
+73 -4

No files matched your search

+6 -4
View File
@@ -2797,10 +2797,6 @@ export class VideoModal {
}
updateSourceAvailability(video) {
if (!this.sourceToggleContainer) {
return;
}
const hasUrl = Boolean(
typeof video?.url === "string" && video.url.trim()
);
@@ -2809,6 +2805,12 @@ export class VideoModal {
video?.torrentSupported
);
this.setShareEnabled(hasUrl || hasMagnet);
if (!this.sourceToggleContainer) {
return;
}
if (hasUrl || hasMagnet) {
this.sourceToggleContainer.removeAttribute("hidden");
this.sourceToggleContainer.classList.remove("hidden");