Repository navigation
Fail over to an mn= mirror node when a stream host will not connect - #35
Merged
Merged
Conversation
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When YouTube assigns a stream node this machine cannot reach, playback stalls: every track costs a guest probe timeout and a 10-minute guest cooldown, then about 30 s of mpv
Timeout was reached. The URLs YouTube returns already name working alternatives inmn=. This change uses them.Closes #36
Change
refryt-resolve:mn_mirrorsandmirror_urlrebuild a googlevideo URL using another node frommn=. The path, signed query, andrrNprefix stay unchanged.mviis therrNindex, not a position inmn=, so mirrors include every entry except the current node.probe_first_bytereplaces the guest probe and probes yt-dlp URLs before direct mpv handoff. Transport failures try mirrors; HTTP statuses, including 403/410 expiry, remain errors rather than triggering probe failover. A working mirror avoids tripping the resolver chain breaker.StreamProxy::fetch_rangeretries transport failures or missing response headers on mirrors and retains the node that answers. A mirror's 403/410 response uses the existing URL-refresh path.curl-connect-timeout=5, not a globalnetwork-timeout=5read cap. Unsupported mpv versions remain usable.Review corrections
Review removed the global mpv read cap and shared 2 s connection cap, which could reject healthy slow streams and guest connections. It also added the post-probe generation check. Three final source reviews found no confirmed actionable regression.
Testing
resolve-spikeswitched to asn-8xgp1vomirror in 5.6 s. The built macOS app then played from that mirror. This was not rerun during review.