fix(post): pin the player to the downloaded file over network sources - #5
Merged
Merged
Conversation
A downloaded video must stay playable offline. Previously the player's default quality came from the page's network formats (preferring 720p), so a download in any other quality — or a download whose store entry hydrated after the network detail — silently streamed from the network again, and a failed/removed video page could leave the screen without any playable source. The video section now subscribes to the downloaded entry for the video and, unless the user explicitly taps another quality pill, pins the selection to the local file. Network refreshes never override it, and a detail response without formats (removed video) still plays the local copy.
Opening a video whose page is gone previously failed silently: a downloaded copy kept playing from disk but nothing explained the missing metadata, and a shell response (title-only, no formats) looked like a successful load. The toast distinguishes the two failure families: - 'post.video_removed' when the video is gone from the site — an HTTP 404/410 (fetchPage now attaches the status to its error), or a 200 shell page that parses but carries no formats; - 'post.site_unreachable' for everything else — offline, timeout, 5xx — where the video may be fine and only the site was unreachable. Both messages were added to all seven locales. Playback is unchanged: downloads keep playing locally.
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.
A downloaded video must stay playable offline. Previously the player's default quality came from the page's network formats (preferring 720p), so a download in any other quality — or a download whose store entry hydrated after the network detail — silently streamed from the network again, and a failed/removed video page could leave the screen without any playable source.
The video section now subscribes to the downloaded entry for the video and, unless the user explicitly taps another quality pill, pins the selection to the local file. Network refreshes never override it, and a detail response without formats (removed video) still plays the local copy.