mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-02 02:42:28 +00:00
feat: enhance playback service logging to debug R2 404 issues
This commit is contained in:
1 parent
175a6f73b4
commit
7b9781a3dd
1 file changed
+15
-1
@@ -472,6 +472,13 @@ class PlaybackSession extends SimpleEventEmitter {
|
||||
const httpsUrl = this.sanitizedUrl;
|
||||
const webSeedCandidates = httpsUrl ? [httpsUrl] : [];
|
||||
|
||||
if (webSeedCandidates.length > 0) {
|
||||
this.service.log(
|
||||
`[playVideoWithFallback] Adding ${webSeedCandidates.length} web seed candidate(s) for fallback:`,
|
||||
webSeedCandidates
|
||||
);
|
||||
}
|
||||
|
||||
let fallbackStarted = false;
|
||||
const startTorrentFallback = async (reason) => {
|
||||
if (fallbackStarted) {
|
||||
@@ -610,13 +617,20 @@ class PlaybackSession extends SimpleEventEmitter {
|
||||
const probeResult =
|
||||
typeof probeUrl === "function" ? await probeUrl(httpsUrl) : null;
|
||||
const probeOutcome = probeResult?.outcome || "error";
|
||||
const probeStatus = probeResult?.status || "unknown";
|
||||
const shouldAttemptHosted =
|
||||
probeOutcome !== "bad" && probeOutcome !== "error";
|
||||
|
||||
this.service.log(
|
||||
`[playVideoWithFallback] Hosted URL probe outcome=${probeOutcome} shouldAttemptHosted=${shouldAttemptHosted}`
|
||||
`[playVideoWithFallback] Hosted URL probe outcome=${probeOutcome} status=${probeStatus} shouldAttemptHosted=${shouldAttemptHosted}`
|
||||
);
|
||||
|
||||
if (probeOutcome === "bad") {
|
||||
this.service.log(
|
||||
`[playVideoWithFallback] ⚠️ Direct URL probe failed with status ${probeStatus}. WebSeed fallback using this same URL will likely also fail.`
|
||||
);
|
||||
}
|
||||
|
||||
if (shouldAttemptHosted) {
|
||||
let outcomeResolved = false;
|
||||
let outcomeResolver = () => {};
|
||||
|
||||
Reference in new issue
Block a user