music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.31k stars 48 forks source link

MA playlists don't work with Qobuz tracks #2743

Closed madbrain76 closed 2 weeks ago

madbrain76 commented 1 month ago

What version of Music Assistant has the issue?

2.1.1

What version of the Home Assistant Integration have you got installed?

2024.6.2

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

I am unable to add any Qobuz tracks to MA playlists. Also, all the built-in MA playlists are empty.

How to reproduce

  1. in the Qobuz app, favorite some tracks and albums
  2. in MA, add the Qobuz music provider . In my case, this is the only music provider installed
  3. in MA, go to tracks, and click one
  4. click the context menu and "add to playlist"
  5. click "New playlist"
  6. name it "test playlist"
  7. MA says the action is being performed in the background
  8. wait as long as a full day
  9. go to playlists and select "test playlist"
  10. note that it is empty
  11. click "playlists"
  12. check MA built-in playlists, such as "500 random tracks (from library)", "All favorited tracks", "Random album (from library)", "Random artist (from library)", "Recently played tracks"
  13. Note that all of them are empty
  14. this does not change as one uses MA and plays various tracks, albums, etc from Qobuz

Music Providers

Qobuz

Player Providers

Invariant. Google Cast, DLNA, Airplay

Full log output

music-assistant.log

Additional information

I didn't test this before, not certain if this is a regression.

Note that playlists created with the Qobuz app do work in MA. This is what I'm using as a workaround for now.

What version of Home Assistant Core are your running

2024.8.1

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Windows

marcelveldt commented 3 weeks ago

Please let us know if this has been fixed in 2.2.0

madbrain76 commented 3 weeks ago

I'm on 2.1.4 still. Has 2.2.0 been released ?

Unfortunately, my Qobuz playlists were deleted as a result of some problem in MA I believe. I deleted them in MA and it deleted them in Qobuz as well in the next synchronize. Since then, I created a playlist in MA, made of Qobuz tracks only, but it doesn't get added to Qobuz (Qobuz app doesn't show it).. I'm really confused as to what the expected behavior of synchronize is for Qobuz & MA. Is it supposed to be 1-way sync ? 2-way sync ? I just don't understand.

It's very possible that part of the problem is related to a very large playlist that I had, which was over 1700 tracks - over 50 different versions of the Goldberg variations at about 32 tracks each on average. Unfortunately, Qobuz claims their playlists are saved on the client side only and they don't keep backups of it, so they were unable to restore it for me. I am not buying that the playlists are client-side only, since I have seen the same playlist show up in the Qobuz web client, Windows client, Android client, & MA clients before.

OzGav commented 3 weeks ago

Sorry to hear about your playlist.

yes 2.2.0 is released.

I don’t use Qobuz but I believe the sync is supposed to be 2 way

madbrain76 commented 3 weeks ago

OK, I got the upgrade notification and installed 2.2 . I'm not seeing any change in behavior, so far.

a) I ran through the steps above again . In step 10, the playlist is no longer empty. That's an improvement.

b) In step 13, the 5 MA built-in playlists are all still empty. However, if I click the "refresh" button, I get something in some of them.

c) regarding the sync, playlists created on the MA side still don't appear on the Qobuz side, even after using the refresh button, and synchronizing the Qobuz provider

Playlists created on the Qobuz side do appear in MA after refreshing/synchronizing . It's possible add to them in MA, and the changes are reflected on the Qobuz side.

So, it looks like the 2-way sync works, but only if the playlist is created in Qobuz, not in MA . I believe that's unchanged behavior from 2.1.x . It probably should be a separate bug.

marcelveldt commented 3 weeks ago

500 random tracks shows 39 tracks

Well, do you have more than 500 items in the library ? Or are you perhaps rescanning ?

all favorited tracks shows 38 tracks

Again, do you even have 500 favorited items ?

Random album shows 5 tracks. But no albums. Click refresh again produces different results, but always tracks.

Playlists show tracks, not albums. The idea if this playlist that it (daily) picks a random album from the library.

Random artist shows 8 tracks. They are not all from the same artist. Click refresh again produces different results, but always tracks.

Playlists show tracks - in this case it picks a random artist and then his tracks within the library. Pressing refresh selects a new artist.

Recently played tracks is empty, no matter how many times I refresh

Sounds like you just had a database reset and there is nothing marked as played yet ?!

regarding the sync, playlists created on the MA side still don't appear on the Qobuz side, even after using the refresh button, and synchronizing the Qobuz provider

You can't create Qobuz playlists from within MA, that option is not present. We could add it if somebody files a feature request.

So, it looks like the 2-way sync works, but only if the playlist is created in Qobuz, not in MA . I believe that's unchanged behavior from 2.1.x . It probably should be a separate bug.

You can EDIT existing QOBUZ playlists from within MA and that will be 2 way synced. You can however not expect that MA playlists (yes MA can have its own playlists) to be synced to QOBUZ.

I'm not sure why Qobuz in MA doesn't support creating new playlists, other providers like Spotify and tidal do support that feature. Not every provider in MA supports the same features.

marcelveldt commented 3 weeks ago

I am not buying that the playlists are client-side only, since I have seen the same playlist show up in the Qobuz web client, Windows client, Android client, & MA clients before.

Well, if you deleted the playlist, it will be gone from their server. They have no obligation to keep a backup on their server although most streaming providers do offer that feature. If the playlist is important to you and you still have an old backup from MA that includes this playlist, I can try to check if the cache still holds a copy for you.

madbrain76 commented 3 weeks ago

Hi,

500 random tracks shows 39 tracks

Well, do you have more than 500 items in the library ? Or are you perhaps rescanning ?

No - this was just an observation I made after hitting the clicking refresh button. Not every line in a comment is a complaint ;) The main problem is still that when first clicking the playlist, it was empty, until I refreshed.

all favorited tracks shows 38 tracks

Again, do you even have 500 favorited items ?

Same - just an observation.

Random album shows 5 tracks. But no albums. Click refresh again produces different results, but always tracks.

Playlists show tracks, not albums. The idea if this playlist that it (daily) picks a random album from the library.

Thanks. That was not obvious to me at all. Now that i know this, I tested it again. I see that it shows favorited tracks that belong to the same album. It never shows all tracks from a favorited album, no matter how many times I hit refresh. Is that expected behavior also ?

Random artist shows 8 tracks. They are not all from the same artist. Click refresh again produces different results, but always tracks.

Playlists show tracks - in this case it picks a random artist and then his tracks within the library. Pressing refresh selects a new artist.

Thanks. That makes sense.

Recently played tracks is empty, no matter how many times I refresh

Sounds like you just had a database reset and there is nothing marked as played yet ?!

It works now. I didn't do anything explicitly that should have caused it. Maybe the upgrade to 2.2 did it.

You can't create Qobuz playlists from within MA, that option is not present. We could add it if somebody files a feature request.

Thanks. I will file a feature request. In the meantime, the limitation should probably be in the Qobuz provider documentation.

I appreciate your offer to retrieve my playlists from the cache. I probably have nightly backups that still have them. I think I will survive without them. The 1700 track playlist in particular was very hard to manage. Trying to resume at the right track is difficult if the client isn't able to resume automatically. from the last time the playlist was paused/stop, since one cannot listen to it all in a single session. Unfortunately, there are numerous situations where the client loses track of the last played track with many clients.

Even manual resumption is impossible with a large playlist unless the client lists the track numbers. Qobuz's own Android & web clients don't do that, sadly. Even if they did, scrolling down an average of 850 tracks is painful enough. MA does number the tracks, so it at least makes that possible. But I have to scroll again every time I change player, which I do many times a day. I know the ability to change player on the fly is planned - I'm eagerly awaiting that feature.

IMO, the right answer to this problem is to have a playlist of albums, not just a playlist of tracks. A playlist of 50 albums would be far easier to manage than a playlist of 1700 tracks. I looked at M3U, PLS and XSPF formats, with the help of Gemini AI and it seems that all of them require the full track list. None can have just one playlist entry per album, and no track entries. Maybe there is something the AI missed. Anyway, it seems that it would be a unique feature if it were to become a part of MA - but likely one that could likely only work with the built-in MA music provider, and definitely an enhancement request, outside of the scope of this particular issue report.

OzGav commented 3 weeks ago

Is the favourite filter off in the view?

madbrain76 commented 3 weeks ago

Is the favourite filter off in the view?

What favorite filter ? The only thing I see that relates to favorites on the playlist screen is the heart icon next to the play button on top. It's empty (not set).

madbrain76 commented 3 weeks ago

Filed the RFE to create playlists in Qobuz provider at https://github.com/orgs/music-assistant/discussions/2790 .

OzGav commented 3 weeks ago

What favorite filter ?

You can review the docs for what each thing in the UI does here https://music-assistant.io/ui/#artist-album-track-view

Are all the tracks of the album actually in the MA library though? The generated playlists are generating from the MA library not Qobuz.

madbrain76 commented 3 weeks ago

What favorite filter ?

You can review the docs for what each thing in the UI does here https://music-assistant.io/ui/#artist-album-track-view

Thanks. The answer to your question is no, the favorite filter wasn't on.

Are all the tracks of the album actually in the MA library though? The generated playlists are generating from the MA library not Qobuz.

Not completely sure of the context for this question. I have many albums with the favorite flag. On some of those albums, I also have specific tracks with the favorite flag. I don't have have a single favorited album with all its tracks favorited.

My MA playlist includes a mix of Qobuz tracks that are favorited, and other Qobuz tracks that are not favorited.

I tried the "recently played tracks" playlist. It showed both tracks that are favorited and tracks that are not.

OzGav commented 3 weeks ago

I don't have have a single favorited album with all its tracks favorited.

I expect this is the reason. I don’t use Qobuz but looking at the docs it is possible that the album and only favourited tracks have been added to the MA library. Go directly to an album you have seen in the “Random album (from library)” playlist via the Albums view and check what tracks you see there. If the tracks you see there are the same as the tracks in the playlist then MA is working correctly.

madbrain76 commented 3 weeks ago

I expect this is the reason. I don’t use Qobuz but looking at the docs it is possible that the album and only favourited tracks have been added to the MA library. Go directly to an album you have seen in the “Random album (from library)” playlist via the Albums view and check what tracks you see there. If the tracks you see there are the same as the tracks in the playlist then MA is working correctly.

I'm not quite following what the expectation is, so I'll list the behavior I see.

  1. I go to the Random album (from library) playlist
  2. It shows one track
  3. I click the | menu and "go to album XXX"
  4. I see all 49 tracks of the album listed there
  5. track 21 is the lone track favorited, same as shown in step 2
OzGav commented 3 weeks ago

When you go to album x what provider icon does it show in the banner at the top? If it is the library icon then do you see that same icon against all the tracks? If you want just screenshot the album view here

madbrain76 commented 3 weeks ago

When you go to album x what provider icon does it show in the banner at the top? If it is the library icon then do you see that same icon against all the tracks? If you want just screenshot the album view here

I don't see a banner at the top, at least not in the album view. In the example below, track 13 is favorited. I had to scroll down to see that. The provider details at the bottom show Qobuz. That is not surprising, since Qobuz is the only music provider I have that contains albums.

image

image

OzGav commented 3 weeks ago

Yes this shows exactly what I thought is happening. Recall that the favourite icon is a means of creating a subset of the LIBRARY items. It is the library items that we care about here so forget about the favourite icon and look at the library icon which is to the left of the heart. In your example above if that album was selected for the random album playlist it would only show ONE track because there is only ONE in the library. The other tracks are available on Qobuz (as shown by that icon) but you have not yet added it to the library.

Look at the series of icons at the top of the tracks list. The second from the left is the IN LIBRARY filter. Personally, I normally have that on.

OzGav commented 3 weeks ago

Please review the docs here https://music-assistant.io/usage/#the-library

madbrain76 commented 3 weeks ago

Thanks for the explanation - and the doc pointer.

OzGav commented 3 weeks ago

Are we good to close this one then?

madbrain76 commented 3 weeks ago

Are we good to close this one then?

The problem in step 10 is definitely resolved.

The problem in step 12 required a refresh before the automated playlists started working. I don't think that refresh should have been necessary. It only needed to be done once, but it was still not intuitive, especially to me who had never noticed the refresh button before. I have seen other parts of the UI where refresh was needed also. Not just playlists, but albums too. Maybe it is related to the Qobuz provider in general, and not specific to playlists.

OzGav commented 3 weeks ago

It is unusual that they were empty to start but there is info here https://music-assistant.io/usage/#playlists

OzGav commented 2 weeks ago

The playlists are the last thing to be populated after a start as the library has to be updated first. Perhaps you just didn't wait long enough?

madbrain76 commented 2 weeks ago

The playlists are the last thing to be populated after a start as the library has to be updated first. Perhaps you just didn't wait long enough?

I had definitely waited long enough when I filed the bug report originally. After the upgrade to 2.2, I am not sure. How long is "long enough". My HAOS VM runs on a pretty beefy AMD 5700G APU with 16GB of RAM, with 4 cores and 8GB of which are assigned to the VM. There isn't much else going on with that host. Mainly a Plex server recording TV shows from a networked HD Homerun, and a JRiver media center server.

OzGav commented 2 weeks ago

Well the log will tell you when the playlists are getting done but you need to have debug set to see it. In any case if it keeps happening please open a new issue and I will keep an eye out for it as I am creating and removing servers regularly.