Jellyfin Forum
Can't add tracks to an M3U Music playlist using the UI - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Can't add tracks to an M3U Music playlist using the UI (/t-can-t-add-tracks-to-an-m3u-music-playlist-using-the-ui)



Can't add tracks to an M3U Music playlist using the UI - somechap - 2025-04-16

Hello from someone new here! I'm trying to add tracks to Jellyfin music playlists which originate from m3u files (pulled from the back end database of Plex, using a python / sql script I cobbled together).

The M3U files are now a bit out of date and need some additions, but when I go to a track in the Jellyfin web front end and select 'Add to Playlist' I only get 'New Playlist' in the drop-down.  It's like it doesn't know about my other (m3u) playlists.  Am I doing something wrong?

Server: Jellyfin 10.10.4 via docker.  Let me know if you need more info, but it's not like it's throwing an error or anything that would show up on logs etc.

Clues much appreciated!


RE: Can't add tracks to an M3U Music playlist using the UI - TheDreadPirate - 2025-04-16

Jellyfin cannot add tracks to M3U files in your library. What you can do is open the M3U playlist in the Jellyfin UI, multi-select all tracks in the playlist, and then add to a new playlist. Which would create a "native" playlist, which you can edit.


RE: Can't add tracks to an M3U Music playlist using the UI - somechap - 2025-04-16

Aha that sounds doable thanks. My only concern is whether there any nuance I need to be aware of so that the tracks will be in the same order, but I'll report back if I have any problems. Otherwise thanks for your help!


RE: Can't add tracks to an M3U Music playlist using the UI - TheDreadPirate - 2025-04-16

It SHOULD add them in order. However, there is currently a bug in native Jellyfin playlists where the first item in the playlist cannot be changed from the UI. But you can edit the playlist XML by hand to change the first item.


RE: Can't add tracks to an M3U Music playlist using the UI - somechap - 2025-04-16

Mmmm interesting thanks; does that apply generally, ie that editing the playlist xml files manually (eg via python) will reflect in the front end (assuming I don't do anything stupid with the xml)?  If so I presume the library would then need a rescan to show the changes?


RE: Can't add tracks to an M3U Music playlist using the UI - TheDreadPirate - 2025-04-16

You could just edit the XML with a text editor. Each item in the playlist is a separate XML line that you can move around. Once you finish editing the XML, just "Scan all libraries" from the dashboard and once it finishes it will reflect the changes to the playlist in the Jellyfin UI.


RE: Can't add tracks to an M3U Music playlist using the UI - somechap - 2025-04-17

Many thanks, this might be starting to answer some questions I had around migrating from one Jellyfin install to another. I'll do some experimentation over the weekend and report back here for googlebility's sake.  For now I'm all good; my playlists are all in Jellyfin and in the right order and editable, so thanks again for your help!

For the benefit of potential future searchers/readers: with my c30 playlists TheDreadPirate's semi-automated solution was fine*, if you've got thousands of playlists it would be cumbersome and ChatGPT had suggested uploading the playlists via Jellyfin's API and had drafted a python script that looked quite sensible (given a set of M3U files, a user ID, and API key to be got from the front end or from curl).  I have absolutely no idea if this would have worked as I didn't end up trying it but i thought it might be worth a mention.

SC

-------

* ie (at least this is how I did it in April 2025 using the v10.10.4 web UI):

1. Place the M3U files in the Jellyfin music library somewhere with unquoted relative paths. (Hint: I prepended '#M3U_' to the M3U filenames to make them easy to spot later.). Suggest disabling real-time scanning of the library for this exercise.

2. Scan the music library and Jellyfin picks the M3U files up as read only playlists.  Assuming all the M3U files are picked up correctly (and real time scanning is disabled), they can (and should) now be deleted / archived somewhere else.

3. For each '#M3U_xyz' playlist:

3.1 Click into the playlist listing page and copy its name without the '#M3U_' prefix from the title.

3.2 Click the three dots to the right of the playlist name and select 'Add to playlist'.

3.3 Select 'New' and paste in the playlist name you copied.  Tick if you want the playlist to be public.

3.4 Click Add; this adds the whole #M3U playlist to a new editable one with the name you pasted. Note the number of tracks in the newly created playlist.

3.5 Navigate back to your '#M3U_' playlist (should just be the browser back button) and if the number of tracks matches then you can delete it.