mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 05:13:01 +00:00
Treat missing CDN/WebTorrent sources as offline
This commit is contained in:
1 parent
0b4523b0be
commit
2dfe20907b
4 files changed
+84
-36
No files matched your search
+16
-4
@@ -474,13 +474,25 @@ class SubscriptionsManager {
|
||||
delete cardEl.dataset.ownerPubkey;
|
||||
}
|
||||
|
||||
cardEl.dataset.urlHealthState = trimmedUrl ? "checking" : "absent";
|
||||
if (trimmedUrl) {
|
||||
cardEl.dataset.urlHealthState = "checking";
|
||||
if (cardEl.dataset.urlHealthReason) {
|
||||
delete cardEl.dataset.urlHealthReason;
|
||||
}
|
||||
} else {
|
||||
cardEl.dataset.urlHealthState = "offline";
|
||||
cardEl.dataset.urlHealthReason = "missing-source";
|
||||
}
|
||||
if (magnetProvided && magnetSupported) {
|
||||
cardEl.dataset.streamHealthState = "checking";
|
||||
} else if (magnetProvided) {
|
||||
cardEl.dataset.streamHealthState = "unsupported";
|
||||
if (cardEl.dataset.streamHealthReason) {
|
||||
delete cardEl.dataset.streamHealthReason;
|
||||
}
|
||||
} else {
|
||||
cardEl.dataset.streamHealthState = "absent";
|
||||
cardEl.dataset.streamHealthState = "unhealthy";
|
||||
cardEl.dataset.streamHealthReason = magnetProvided
|
||||
? "unsupported"
|
||||
: "missing-source";
|
||||
}
|
||||
|
||||
// Leave the data-play-* attributes empty in the literal markup so we can
|
||||
|
||||
Reference in new issue
Block a user