[PR #13857] Add support for downloading playlists #13744

Open
opened 2026-02-07 07:18:25 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/13857
Author: @flip-dots
Created: 4/7/2025
Status: 🔄 Open

Base: masterHead: download-playlists


📝 Commits (5)

  • f5e227b Add support for downloading playlists
  • 65979ba Avoid buffering playlist zip in memory
  • 9bb1785 Add support for downloading albums
  • e963e62 Use ValueTuple and simplify headers
  • 75758f9 Disable compression for media files in zip

📊 Changes

4 files changed (+182 additions, -3 deletions)

View changed files

📝 Jellyfin.Api/Controllers/LibraryController.cs (+66 -3)
Jellyfin.Api/Helpers/PositionWrapperStream.cs (+70 -0)
📝 MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs (+5 -0)
📝 MediaBrowser.Controller/Playlists/Playlist.cs (+41 -0)

📄 Description

Changes

This PR adds support for downloading playlists. When downloading a playlist items are put into a .zip file and the structure is preserved (i.e if I have a track from /media/music/artist/album/track_1 in a playlist it will generate a structure inside the playlist.zip of media/music/artist/album/track_1). It will also generate a .m3u8 from the playlist with the correct relative paths for these files to be played in the order they are defined in the playlist and this is put in the .zip file as well.

I suspect this could be fairly easily extended to also work for albums but havent tried that yet and it might make more sense for that to be in a seperate PR.

P.S - Please dont be too harsh, I havent written any C# in years :P

Issues

Fixes:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/13857 **Author:** [@flip-dots](https://github.com/flip-dots) **Created:** 4/7/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `download-playlists` --- ### 📝 Commits (5) - [`f5e227b`](https://github.com/jellyfin/jellyfin/commit/f5e227bec1c079c4d2a918550865777127a0014f) Add support for downloading playlists - [`65979ba`](https://github.com/jellyfin/jellyfin/commit/65979ba8321d237f9666a18f2273646209fadfc9) Avoid buffering playlist zip in memory - [`9bb1785`](https://github.com/jellyfin/jellyfin/commit/9bb1785edd592775e7ab8be8683c15d6ca92793e) Add support for downloading albums - [`e963e62`](https://github.com/jellyfin/jellyfin/commit/e963e624fd1c31379ded4a8517e7df3fb0729233) Use ValueTuple and simplify headers - [`75758f9`](https://github.com/jellyfin/jellyfin/commit/75758f90ad6748b2b6bd80b0bf5e99f2265dfd99) Disable compression for media files in zip ### 📊 Changes **4 files changed** (+182 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Jellyfin.Api/Controllers/LibraryController.cs` (+66 -3) ➕ `Jellyfin.Api/Helpers/PositionWrapperStream.cs` (+70 -0) 📝 `MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs` (+5 -0) 📝 `MediaBrowser.Controller/Playlists/Playlist.cs` (+41 -0) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> This PR adds support for downloading playlists. When downloading a playlist items are put into a .zip file and the structure is preserved (i.e if I have a track from /media/music/artist/album/track_1 in a playlist it will generate a structure inside the playlist.zip of media/music/artist/album/track_1). It will also generate a .m3u8 from the playlist with the correct relative paths for these files to be played in the order they are defined in the playlist and this is put in the .zip file as well. I suspect this could be fairly easily extended to also work for albums but havent tried that yet and it might make more sense for that to be in a seperate PR. P.S - Please dont be too harsh, I havent written any C# in years :P **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Fixes: - https://github.com/jellyfin/jellyfin-media-player/issues/604 - https://github.com/jellyfin/jellyfin-android/issues/498 - https://forum.jellyfin.org/t-playlist-download-all - https://github.com/jellyfin/jellyfin-android/issues/162 - https://features.jellyfin.org/posts/655/download-a-batch-not-only-single-media-file --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:18:26 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13744