Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case-sensitive username matching can incorrectly filter out playlists from being editable #384

Open
hkdd opened this issue May 12, 2024 · 14 comments
Labels
needs-info An issue that needs more information

Comments

@hkdd
Copy link

hkdd commented May 12, 2024

Using the latest release of Navidrome (0.52.0) and latest Flatpak of Supersonic (0.10.1) the Playlists section of Supersonic does not display any playlists at all. The navidrome webui and other players like Feishin show all playlists.

@dweymouth
Copy link
Owner

Can't replicate it here on my personal Navidrome 0.51.0 or on the Navidrome demo (0.52.0). Did this just start happening for you with the latest Navidrome update? And can you run Supersonic from the terminal and see if it prints out any error messages?

@hkdd
Copy link
Author

hkdd commented May 12, 2024

I was actually on 0.51.1 and it wasn't working so I upgraded to 0.52.0 and got the same behavior. This is my first time using Supersonic so no previous history of the two together. The only control I have is that Feishin can handle playlists before and after the update.

Here's the console output from running Supersonic (via flatpak) and then click on the playlists tab:

[jon@zen ~]$ flatpak run io.github.dweymouth.supersonic
2024/05/12 15:52:36 Starting supersonic...
2024/05/12 15:52:36 Using config dir: /home/jon/.var/app/io.github.dweymouth.supersonic/config/supersonic
2024/05/12 15:52:36 Using cache dir: /home/jon/.var/app/io.github.dweymouth.supersonic/cache/supersonic
2024/05/12 15:52:36 Creating session lock file
2024/05/12 15:52:36 failed to load theme file "": open /home/jon/.var/app/io.github.dweymouth.supersonic/config/supersonic/themes: no such file or directory
2024/05/12 15:52:36 systray error: failed to request name: org.freedesktop.DBus.Error.ServiceUnknown
2024/05/12 15:52:36 systray error: failed to register: The name is not activatable

Not sure if the systray errors are related to my window manager (dwm) or if they're relevant at all.

@dweymouth
Copy link
Owner

dweymouth commented May 12, 2024

Hmm, very strange. None of those errors would be related to playlists. Can you connect to the Navidrome demo in Supersonic and see if playlists show up (and if any other errors print to stdout)? Also, if you could try another client that uses navidrome via the Subsonic API (ie not Feishin, but sublime-music, Strawberry, or any phone app), are they also able to show the playlists?

This is strange and could be a hard one to track down. It's definitely working on my end so I'm not sure what the cause could be

@hkdd
Copy link
Author

hkdd commented May 12, 2024

Using the navidrome demo website works just fine via supersonic, the playlists show up.

From Ultrasonic on Android and Substreamer on iOS both, show playlists.

So it's just a combination of (my specific) Navidrome installation and Supersonic (flatpak).

I run Navidrome via docker behind traefik so could be some kind of weird reverse proxy issue? I've seen strange stuff before.

Is there anything I can do to get more verbose output from Supersonic in the terminal that might help me determine the issue?

@dweymouth
Copy link
Owner

dweymouth commented May 12, 2024

Unfortunately, no, unless you build from source and add additional log lines. Debug logging is definitely something I will need to improve at some point. Could you try visiting the same URL that Supersonic pulls playlists from in your browser? It should return an XML document with playlist info. That would be:

<YOUR-NAVIDROME-BASE-URL>/rest/getPlaylists?u=<USERNAME>&p=<PASSWORD>&v=1.15.0&c=supersonic

@hkdd
Copy link
Author

hkdd commented May 12, 2024

That works just fine, I get a legitimate response that is an xml document with a huge list of playlist names.

\<subsonic-response status="ok" version="1.16.1" type="navidrome" serverVersion="0.52.0 (92a98cd5)"     openSubsonic="true">
<playlists>
<playlist id="5d7a42e2-1b10-4b08-86db-38b9e91656b3" name="playlist1" comment="Auto-imported from   'playlist1.m3u" songCount="11" duration="2758" public="false" owner="jon" created="2023-01-15T16:48:10.319786304Z" changed="2023-02-18T21:05:28Z" coverArt="pl-5d7a42e2-1b10-4b08-86db-38b9e91656b3_63f13d98"/>

[...]

etc, etc.

edit: sorry, that's a mess. you get the idea.

@dweymouth
Copy link
Owner

Wait, does it actually start with a slash, or was that just a typo?

@hkdd
Copy link
Author

hkdd commented May 12, 2024

Just a typo, it looks like a total valid xml response to me. Firefox identifies it as xml and formats it as such.

@dweymouth
Copy link
Owner

Hmm, not sure what else to suggest - other than trying a non-Flatpak build I guess, either building from source or if your distro is Debian-based you should probably be able to run the release Linux binary.

@hkdd
Copy link
Author

hkdd commented May 12, 2024

Sounds good, I'll give it a shot. Thanks for your help!

@dweymouth
Copy link
Owner

Did you ever come to a resolution on this or find out more info? I wish I could help but not being able to reproduce it on my end, I have no idea what could be going on

@dweymouth dweymouth added the needs-info An issue that needs more information label May 24, 2024
@Theta-Dev
Copy link

Theta-Dev commented Jun 6, 2024

I found the issue. Navidrome (I dont know about the other servers) uses case-insensitive usernames. So if your username is ThetaDev, you can still login using thetadev.

The playlist dialog only shows the playlists whose usernames equal the configured username. If you entered your username with wrong capitalization, none of the playlists will show up.

So the quick fix is to check the configured username and make sure it is spelled correctly. As a permanent fix, I would suggest fetching the actual username from the Subsonic API or use case-insensitive comparison (I am not sure if case-insensitive usernames are actually part of the Subsonic API specification or if that is just a feature of Navidrome).

@dweymouth
Copy link
Owner

Hmm interesting, the playlists are only missing from the "Add to playlist" dialog, right? They still show in the main playlist view? (b/c Supersonic only filters playlists by username for that dialog to remove playlists the user isn't allowed to edit).

Case sensitivity of usernames isn't specified either way in the Subsonic API, so I think I have to assume usernames may be case-sensitive, so fetching the username from the server after a successful login, which may differ in case from the username entered into Supersonic, should be the long-term solution.

@dweymouth dweymouth changed the title Playlists not working with Navidrome Case-sensitive username matching can incorrectly filter out playlists from being editable Jun 6, 2024
@Theta-Dev
Copy link

Theta-Dev commented Jun 6, 2024

Yes, that is correct. Viewing playlists is not a problem for me, only adding tracks to them.

Jellyfin also uses case-insensitive usernames, so that fix should also be applied to the Jellyfin client.

Update: I read the original issue description again and now I am not sure whether I am experiencing the same issue as @hkdd, since he is writing about the playlist section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info An issue that needs more information
Projects
None yet
Development

No branches or pull requests

3 participants