Skip to content

Download manager improvements#210

Merged
dragonflylee merged 4 commits intodragonflylee:devfrom
docmeth02:feature/download-improvements
Apr 24, 2026
Merged

Download manager improvements#210
dragonflylee merged 4 commits intodragonflylee:devfrom
docmeth02:feature/download-improvements

Conversation

@docmeth02
Copy link
Copy Markdown
Contributor

Follow-up to #209. This addresses the immediate gaps mentioned there and fixes a few issues found during testing.

  • Diagnostic overlay (F1) now works during offline playback, showing codec, resolution, bitrate and other local file metrics.
  • Episodes can be downloaded directly from the series/season view via the context menu (F4/X), with proper series name and episode numbering preserved in the downloads list.
  • Downloads are accessible in airplane mode — the Remote tab is now visible on the server selection screen so downloaded media can be played without a Jellyfin connection.
  • Fixed a crash when exiting offline playback caused by an event subscription outliving the player view.

Init VideoProfile on MPV_RESUME for local downloads so F1 shows
codec, resolution, bitrate and other playback metrics.
- Wire up context menu (F4/X) on episode cards in season view so
  episodes can be downloaded from the series page
- Add Episode overload for ContextMenu and DownloadManager::addDownload
  to preserve series name and season/episode indices in download metadata
- Fix MPV event subscription leak in offline playback overlay by
  unsubscribing on MPV_STOP to prevent use-after-free
- Fix race in Episode addDownload where processQueue could start before
  episode metadata was persisted
- Show Remote tab (with Downloads) in ServerList even without configured
  remotes, so downloaded media is accessible in airplane mode
Defer MPV event unsubscribe to next main-thread tick via brls::sync()
to avoid iterator invalidation when erasing from the callback list
while Event::fire() is still iterating it.
Handle all terminal MPV events (MPV_STOP, END_OF_FILE, MPV_FILE_ERROR)
and guard with atomic flag to prevent calling profile->init() after
the view is destroyed and to avoid erasing the same iterator twice.
@dragonflylee dragonflylee merged commit 4fd0aa0 into dragonflylee:dev Apr 24, 2026
@dragonflylee dragonflylee mentioned this pull request Apr 27, 2026
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.

2 participants