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

Jellyfin: "Play Artist Station" doesn't work if you call it a second time #284

Closed
adamshand opened this issue Nov 15, 2023 · 9 comments
Closed
Labels
bug Something isn't working server:jellyfin
Milestone

Comments

@adamshand
Copy link

adamshand commented Nov 15, 2023

Using the Jellyfin backend, if you go to an artist page and select "Play Artist Station" it works as expected. But if you then go to a different artist page and select "Play Artist Station" it doesn't load in the new station.

Quitting Supersonic and selecting "Play Artist Station" for the second artist works as expected.

@dweymouth dweymouth added bug Something isn't working server:jellyfin labels Nov 15, 2023
@dweymouth
Copy link
Owner

dweymouth commented Nov 15, 2023

Edit for visibility: This is fixed on main for 0.8.1

That's so weird! Just confirmed it, but all I'm doing is calling Jellyfin's Instant Mix API with the album ID of one of the artist's albums. I wonder if for some reason Jellyfin isn't creating a fresh Instant Mix? This might be a tough one to track down..

@dweymouth dweymouth changed the title "Play Artist Station" doesn't work if you call it a second time Jellyfin: "Play Artist Station" doesn't work if you call it a second time Nov 15, 2023
@adamshand
Copy link
Author

Wondered if it might be a Jellyfin bug, though confusing why restarting Supersonic fixes it ...

@dweymouth
Copy link
Owner

Well restarting will establish a new authentication with the Jellyfin server so it could still clear out somethign on the Jellyfin end too. There's definitely no state I'm keeping on my side that would cause this. Either I'm not using the API right or there's a bug on Jellyfin's side

@adamshand
Copy link
Author

I'm no good at GoLang, but I could try a minimal JS repro ... is that useful?

@dweymouth
Copy link
Owner

dweymouth commented Nov 16, 2023

Yeah, if you could get it to repro (or not) in JS that would be helpful to track what's going on. For best maintainability I made an adapter layer that presents the same API to the UI layer regardless of the backend, and for Subsonic, playArtistRadio(artistID) just calls getSimilarSongs on the server with the artist ID. For Jellyfin, the documentation says the InstanctMix API only works with album IDs, so I first get an album by that artist with an API call on /Users/<jfUserID>/Items, with a filter of ItemType=album and ArtistID=< artistID > and Limit=1. Then call /Items/<albumID>/InstantMix to actually get the song list. What I wonder is if there was some Reset call or parameter you're supposed to set to communicate that you want a new InstantMix, and not the same collection of songs

https://api.jellyfin.org/#tag/InstantMix

@adamshand
Copy link
Author

Was just seeing if I could repo it inside the Jellyfin app itself.

Interestingly, I get wildly different results. I have a not very well known New Zealand artist called "Chris Knox". On Supersonic, I get a very limited set of artists returned (basically just the one album plus a tribute album). If I hit "Instant Mix" on "Chris Knox" in the Jellyfin web UI, I get a whole assortment of NZ artists.

@dweymouth
Copy link
Owner

I wonder if the API documentation is incorrect that it only works for albums and I'd get a broader set of results just using the artistID directly as the seed. I can try that on my library as well - not sure it'll solve the repeated InstantMix issue but maybe it will give better results on the first call.

@dweymouth
Copy link
Owner

OK, I'm stupid... there's an /Albums/<id>/InstantMix and an /Artists/<id>/InstantMix. Still not sure if this will solve the issue but at least avoids the whole "get an album just so we can have an albumID" thing

@dweymouth dweymouth added this to the 0.8.1 milestone Nov 16, 2023
dweymouth added a commit that referenced this issue Nov 16, 2023
@dweymouth
Copy link
Owner

Fixed in 0.8.1

natilou pushed a commit to natilou/supersonic that referenced this issue Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server:jellyfin
Projects
None yet
Development

No branches or pull requests

2 participants