jellyfin / mopidy-jellyfin

Jellyfin Extension for Mopidy
https://jellyfin.org
Apache License 2.0
93 stars 16 forks source link

No playlists detected #104

Closed lunarys closed 3 years ago

lunarys commented 3 years ago

Mopidy does not show my playlists from Jellyfin in any of the frontends I tried (ncmpcpp, Muse, Musicbox, Iris, Homeassistant).

I tried the python scripts from issue #18 and they seem to work as expected. This script shows me a list of all my artists and playlists, however this one only lists the source directory of my music library, which looks like this:

===== Top level contents of "Music" =====
music
classical
playlists

This structure is created by the sync client I use to manage my library.

The only playlists I see are Favorites - Albums and Favorites - All. I can browse and play all files just fine, also Jellyfin is showing and handling everything correctly, its just the playlists that are missing.

mcarlton00 commented 3 years ago

What version of the server and mopidy-jellyfin are you running? The scripts as they sit no longer work correctly on version 10.7.x of the server. That said, the second script is looking specifically for 'Music' libraries. You can change the library_name variable to 'Playlists' to get others.

lunarys commented 3 years ago
These are the versions I currently run: Version
Jellyfin 10.6.3
Mopidy 3.1.1
Mopidy-Jellyfin 1.0.2
Mopidy-MPD 3.1.0
Mopidy-Muse 0.0.24
Mopidy-MusicBox-Webclient 3.1.0

The playlists are in the same 'Music' library in Jellyfin as all the audio files, so if I understand you correctly, the library_name won't change anything...

I added the respective part from my mopidy.conf, in case that helps anything.

[mpd]
enabled = true
hostname = 0.0.0.0
port = 6600

[http]
enabled = true
hostname = 0.0.0.0
port = 6680

[jellyfin]
enabled = true
hostname = jellyfin
username = xxx
password = xxx
libraries = Music
mcarlton00 commented 3 years ago

The library_name variable tells it specifically what library it should be looking for. Playlists are their own separate library type, so just telling it to look for Music wouldn't show them.

You're on a rather old Jellyfin server version. I don't expect that's the issue here, but it's worth mentioning. 10.7.2 is the latest stable release, with 10.6.4 being the latest of the 10.6 release cycle.

My assumption at this point is since you have a nonstandard filesystem layout in your library, it's causing some things to not behave as expected. When you run the second script from the other thread, you get

music
classical
playlists

When I run that script, I get a list of artists in my library.

I'm assuming that inside that playlists directory you have directories with other music sorted by playlist? The playlist support here (and I'm guessing in nearly every other client) is expecting to find Playlist objects that have been created within the Jellyfin server, not a filesystem based view

lunarys commented 3 years ago

Thanks for mentioning this, I updated my instance.

The playlists directory contains playlists in .m3u format, the music directory contains music files like {artist}/{album}/{title}. I use this as I automatically generate playlists from file tags.

I figured out the issue: I never created a playlist in Jellyfin, instead I only loaded them from .m3u files. Thus I did not have a playlist library (and did not even know this existed), the playlists were just shown in a tab in the music library. I created a playlist in Jellyfin to test whether this one would be detected. Now I see the playlists library in Jellyfin and mopidy shows all my playlists.

So the fix was: Simply create a playlist in Jellyfin.

Thanks for your help and sorry for the troubles!