Skip to content

Download Manager#2012

Draft
JPKribs wants to merge 38 commits into
jellyfin:mainfrom
JPKribs:downloads
Draft

Download Manager#2012
JPKribs wants to merge 38 commits into
jellyfin:mainfrom
JPKribs:downloads

Conversation

@JPKribs

@JPKribs JPKribs commented May 12, 2026

Copy link
Copy Markdown
Member

Summary

Resolves: #1784

This should meet the following items. I wrote these for the original post so it was also my gameplan for this as well:

  • Input from BaseItemDto to queue downloads
    - Handle single items and items with children (series/seasons/episodes or collections/children) <- This is missing as folder items are not set with canDownload from server.
    • Ensure that all parent/children have key relationships to represent this hierarchy in code later
  • Download media files with progress tracking
    • Support pause, resume, and delete operations
    • Maintain queue state across app restarts (SwiftfinStore), including paused/resumed state
  • Store complete metadata in CoreStore
    • Save all item details for offline access
    • Metadata should fully populate offline views like DownloadItemView and support all FilterViewModel filtering in PagingLibraryView
  • Download and store associated images alongside media files
    • posters, backdrops, and logos
    • The CoreStore record, on read, must conform to the Poster protocol
      • Like BaseItemDto but DownloadItemDto
  • Organize downloaded files in a logical structure
    • Maintain hierarchy by content type (movies, series, seasons, episodes)
  • Group downloads logically to support navigation in offline views
  • ItemView Download Button
    • Add a download button to ItemView
    • Button should only be visible if Experimental -> Enable Downloads is true
    • Button behavior:
      • If not downloading → start download
      • If downloading → pause/resume
      • If errored→ retry download
      • If completed → delete download

Outside of these, I can some stubs set for transcoded downloads although that's mostly just a flag for bitrate. For now this only takes Maximum.

WIP

This is still WIP while I test and try to break this more. I just nailed down the manager/task pattern so I'm likely to find something that doesn't work as expected. I also need to figure out where the downloads end up. There is still a bit I need to figure out so mostly making this as a draft to avoid duplicate work.

Video

Demo.mov

@JPKribs JPKribs added enhancement New feature or request iOS Impacts iOS or iPadOS labels May 12, 2026

@LePips LePips left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that working on this looks exciting, but I'm going to caution going too much further. I really need to take a look at the many other open PRs and I would have something like this be implemented after #1752 anyways, which would change the direction of some parts that I see are being worked on.

@JPKribs

JPKribs commented May 13, 2026

Copy link
Copy Markdown
Member Author

I understand that working on this looks exciting, but I'm going to caution going too much further. I really need to take a look at the many other open PRs and I would have something like this be implemented after #1752 anyways, which would change the direction of some parts that I see are being worked on.

Understood. This is kind of a thinking out loud branch.

For this part I'm primarily just looking to lock down the downloading/metadata side of this. I am expecting this to be a draft until #1752 is done. The paging part of this is really bare bones with the understanding this will need to be reworked post-1752.

I also think if "transcoded downloads" are a route in the future that's an SDK item... essentially, request HLS F-MP4 and then combine the results into a file. It's pretty easy to do but it introduces so many edge cases!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request iOS Impacts iOS or iPadOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants