mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 01:12:39 +00:00
Merge pull request #1477 from PR0M3TH3AN/update-webtorrent-config-9552895628045698758
Improve WebTorrent Fallback Reliability
This commit is contained in:
4 files changed
+11
-8
No files matched your search
@@ -497,12 +497,13 @@ class Application {
|
||||
|
||||
if (source === "torrent" && hasActivePeers === false) {
|
||||
userLogger.warn(
|
||||
"[app] Unable to switch to torrent playback: no active peers.",
|
||||
"[app] Switching to torrent playback despite 0 active peers detected.",
|
||||
);
|
||||
this.showError(
|
||||
"Torrent playback is unavailable right now because there are no active peers.",
|
||||
this.showStatus(
|
||||
"Warning: No peers detected. Playback may fail or stall.",
|
||||
{ autoHideMs: 5000 }
|
||||
);
|
||||
return;
|
||||
// Proceed anyway
|
||||
}
|
||||
|
||||
if (source === "url" && cdnUnavailable) {
|
||||
|
||||
@@ -109,6 +109,8 @@ const DEFAULT_WSS_TRACKERS = Object.freeze([
|
||||
"wss://tracker.files.fm:7073/announce",
|
||||
"wss://tracker.btorrent.xyz",
|
||||
"wss://tracker.novage.com.ua:443/announce",
|
||||
"wss://tracker.webtorrent.dev",
|
||||
"wss://open.video.lukewarlow.uk:443/announce",
|
||||
]);
|
||||
|
||||
const SANITIZED_DEFAULT_BLUR_THRESHOLD = coerceNonNegativeInteger(
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ function queueProbe(magnet, cacheKey, priority = 0) {
|
||||
}
|
||||
|
||||
const PROBE_CACHE_TTL_MS = 5 * 60 * 1000;
|
||||
const PROBE_TIMEOUT_MS = 8000;
|
||||
const PROBE_TIMEOUT_MS = 20000;
|
||||
const PROBE_CONCURRENCY = 96;
|
||||
const PROBE_POLL_COUNT = 3;
|
||||
const PRIORITY_BASELINE = 1_000_000;
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import { WSS_TRACKERS as DEFAULT_WSS_TRACKERS } from "./constants.js";
|
||||
|
||||
export const TRACKER_TIMEOUT_MS = 3000;
|
||||
export const TRACKER_PER_MAGNET = 3;
|
||||
export const TRACKER_TIMEOUT_MS = 6000;
|
||||
export const TRACKER_PER_MAGNET = 10;
|
||||
export const HEALTH_TTL_MS = 2 * 60 * 1000;
|
||||
export const CONCURRENCY = 3;
|
||||
export const CONCURRENCY = 6;
|
||||
export const TRACKER_ERROR_COOLDOWN_MS = 60 * 1000;
|
||||
|
||||
export function resolveTrackerList({ magnetTrackers } = {}) {
|
||||
|
||||
Reference in new issue
Block a user