Jellyfin Forum
Import playlists from MusicBee to read only Jellyfin. - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Import playlists from MusicBee to read only Jellyfin. (/t-import-playlists-from-musicbee-to-read-only-jellyfin)



Import playlists from MusicBee to read only Jellyfin. - 655321 - 2023-07-19

I've been using MusicBee as my main music player for years as it's the only windows player I've tested that effortlessly handles my 791,000 tracks library.

My goal is to be able to use the playlists I create and manage in MusicBee on my phone in Symfonium.
Symfonium uses the jellyfin API as its source so jellyfin is where I must import my playlists.

I'm wondering what the best way and format to import my playlists in jellyfin is.

MusicBee offers me these options to export my playlists. What would be best suited for an import to jellyfin?
   

I wasn't able to find an "import" button for playlists within jellyfin itself.

I'm aware that I could save my exported playlist files somewhere in my music folders but then every user would have access to them and other players might also import them, which I do not want (my library is accessed via MusicBee, Mediamonkey, Plex, Jellyfin and Navidrome at the same time, with everything except MusicBee having read only access).

I'd much rather import/store the playlists for jellyfin separated from my music (which would also alleviate the problem that jellyfin has read only access to my music folders).

W̶h̶e̶r̶e̶ ̶a̶r̶e̶ ̶p̶l̶a̶y̶l̶i̶s̶t̶s̶ ̶s̶t̶o̶r̶e̶d̶ ̶w̶i̶t̶h̶i̶n̶ ̶j̶e̶l̶l̶y̶f̶i̶n̶ ̶w̶h̶e̶n̶ ̶i̶t̶ ̶d̶o̶e̶s̶ ̶n̶o̶t̶ ̶h̶a̶v̶e̶ ̶w̶r̶i̶t̶e̶ ̶a̶c̶c̶e̶s̶s̶ ̶t̶o̶ ̶t̶h̶e̶ ̶m̶u̶s̶i̶c̶ ̶l̶i̶b̶r̶a̶r̶y̶? #Found the location, see update at the bottom.
Can I just drop the exported playlists from MusicBee there and it will pick them up? How can I limit which user can see which playlist?

My end goal is:
Create playlist in musicbee -> export -> import to jellyfin -> let jellyfin rescan my music library -> let Symfonium sync to jellyfin -> have playlist in Symfonium where I can store it in offline-cache and listen to it without internet access while I ride my bicycle through the woods while it still scrobbels to LastFM and Maloja and also submits the plays to Jellyfin once the internet connection is restored.

Any help would be appreciated.

Update:
I found where Jellyfin stores the playlists internally. On the freebsd version it's "/var/db/jellyfin/data/playlists/" with a subdirectory for each playlist containing the playlist as an .xml file.

The only thing close to an .xml file that I can export from MusicBee is XSPF, however that follows a different syntax.

How would I go about converting a playlist exported from MusicBee to the syntax of the .xml that jellyfin uses internally?

Update2:
I wrote a rudimentary python script to convert an m3u8 playlist exported from musicbee to the .xml syntax that jellyfin uses.
Then I placed the resulting playlist in "/var/db/jellyfin/data/playlists/" in a folder with the same name as the playlist and the filename of "playlist.xml".
Exactly the same as the playlist I created from within jellyfin:
/var/db/jellyfin/data/playlists/Test Playlist/playlist.xml
/var/db/jellyfin/data/playlists/My playlist/playlist.xml

However it seems that jellyfin does not scan for changes in these directories. I did a rescan of my music library and the playlist did not show up.
I restarted the jellyfin service, it still did not show up in the UI.
Then I even copied my own playlist file over the "playlist.xml" file from the playlist created in jellyfin, overwriting the content.
That also did not lead to any changes within the UI. The playlist still showed the same tracks from when I created it instead of the content of the actual file.
Another rescan and restart did not change this either.

Maybe all I found is the backup location of the internal playlists and I'd have to modify files in a different location to get the playlist changes recognized.

Some insight would be very helpful.

Update3:
Found this reddit post from 2 years ago confirming my findings.
"No. There is a Playlist folder that is written with xml files when you create playlists inside Jellyfin, but that folder doesn't appear to be read at all by the server."

Update4:
I thought I could trick jellyfin into giving me what I want.
First I placed my playlist as an .m3u8 in the root directory of my music folder and let jellyfin scan.
It correctly imported the playlist. Oddly, no new playlist folder appeared in /var/db/jellyfin/data/playlists/.

As expected, the imported playlist is visible for all users, which is unwanted.

I then noticed that I can use "Add to playlist" on the imported playlist within Jellyfin to copy it over to a playlist limited to my user, created from within jellyfin.
The thusly created playlist did lead to the creation of a new folder in /var/db/jellyfin/data/playlists/.

However the newly created playlist ignores the original order of songs in the source playlist and sorts all songs by title alphabetically, which makes it useless for me as my playlists grow over decades and the position of each song matters.


RE: Import playlists from MusicBee to read only Jellyfin. - 655321 - 2023-07-20

I achieved what I wanted in the end:
1. Export playlist in MusicBee to m3u8 with paths that are correct for jellyfin.
2. Place m3u8 file in a folder in the music library.
3. Let jellyfin rescan the music library.
4. Sync the jellyfin source in Symfonium.
5. Import the playlist in Symfonium.
6. Delete the m3u8 file from the music folder.
7. Let jellyfin rescan the music library.

That way I have the playlist on my phone while it does not show up for any other user in jellyfin or any of my other programs.

It's far from intuitive, takes a long time and changing something in the playlist requires redoing all of the steps above.

None of it would be necessary if jellyfin had an "import playlist" option in the UI that imports playlists, limits their scope to the user who imported them as default and lets users edit ownership (if you do want to share your playlist with another user) within the UI.
Or if it at least had a folder like "/var/db/jellyfin/data/playlists/" with the difference that it actually scans the files in that folder.