Page links played here only also go through a reader of their own: Bilibili's cuts never end playback

Alone, or with Everyone fetches it, a page link with plain-file tracks
plays through SharedLinks.local (a SharedSource without the upload): it
resumes after a cut, backs off on 412/429/5xx and resolves the page again
on 403/410/412, where ffmpeg's own reconnect gave up for good. Pieces
tracks and a reader that cannot open keep yt-dlp's URLs as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
foxyzandClaude Opus 5.5 committed 2026-10-18 17:33:31 +03:00
1 parent f2721d125c
commit 4c8ddeb034
5 files changed
+183 -16

No files matched your search

+14 -3
View File
@@ -1284,10 +1284,21 @@ all three link modes. Nothing is bundled or installed by hand.
`swapLink` refuses it the same way for any other caller.
- **Everyone fetches it**: the swap sends the page URL. Every app
resolves it with its own yt-dlp (the media pipeline's resolve step,
`LinkResolver.probe`, waiting for the download on first use) and opens
what yt-dlp picked (`YtDlpPlay.mpvUrl`) with its headers as mpv's
`LinkResolver.probe`, waiting for the download on first use). A page
whose relay tracks are plain files (`SharedLinks.fits`) plays through
a reader of this app's own, as alone with no relay
(`SharedLinks.local`: a `SharedSource` without the upload, "Read once"
under "Relay"): its tracks with yt-dlp's headers and cookies, resumed
after a cut, backed off on 412/429/5xx, the page resolved again on
403/410/412, so a CDN cutting a long read (Bilibili: "Stream ends
prematurely", then a refused reconnect that ffmpeg treats as fatal)
never reaches the player. The reader is opened with its sizes (15 s);
one that cannot (a refusal, a pieces track, a live stream) leaves the
player on what yt-dlp picked (`YtDlpPlay.mpvUrl`) with its headers as mpv's
`http-header-fields` (media_kit's `Media.httpHeaders`), for every
track of the EDL: Bilibili's CDN answers 403 without the Referer. Its
track of the EDL: Bilibili's CDN answers 403 without the Referer. The
session player's and the preload's readers stay, any other closes
(`trimLocal`); Reload video makes a new one. Its
subtitles are added once the media is in (`sub-add <url> auto`). mpv's
own Lua yt-dlp hook is off (`ytdl=no`): one resolve path for every mode,
cookies and headers always the app's, and a libmpv without Lua plays