Skip to content

fix(post): pin the player to the downloaded file over network sources - #5

Merged
ghostcoder42 merged 2 commits into
mainfrom
fix/offline-playback-priority
Sep 3, 2026
Merged

ghostcoder42 merged 2 commits into
mainfrom
fix/offline-playback-priority

Conversation

@ghostcoder42

Copy link
Copy Markdown
Owner

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.

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.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

💯 Test Coverage

Lines Statements Branches Functions
Coverage: 50%
50.67% (752/1484) 42.85% (369/861) 41.23% (200/485)

😎 Tests Results

Tests Skipped Failures Errors Time
243 0 💤 0 ❌ 0 🔥 18.818s ⏱️
👀 Tests Details • (50%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files50.6742.8541.2350.89 
src/app/post90.2475.5182.7592.53 
   [id].tsx90.2475.5182.7592.53194, 267, 277, 368–391
src/lib/r3482.6676.147082.97 
   scraper.ts81.1872.366.6682.19–38, 114–117

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.
@ghostcoder42
ghostcoder42 merged commit 5db3ccd into main Sep 3, 2026
1 check passed
@ghostcoder42
ghostcoder42 deleted the fix/offline-playback-priority branch September 3, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant