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.32k stars 49 forks source link

Spotify Playlists not synchronising automatically #2708

Closed DanielHabenicht closed 2 months ago

DanielHabenicht commented 2 months ago

What version of Music Assistant has the issue?

2.1.0 (would be nice if one could copy that from the version table in music assistant)

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

2024.5.1

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

The problem

The Playlists are not synchronised even after triggering the synchronisation process of the provider manually or restarting the provider.

How to reproduce

Have a look at the "Discover Weekly" Playlist of Spotify - It does not refresh with the most recent songs. Another way is to add a song to a playlist and immediately after trigger a manual synchronisation. -> Songs in the Music Assinstant playlists stay the same.

Music Providers

Spotify (not using any other)

Player Providers

not relevant, but I am using slimproto

Full log output

music-assistant.log

Additional information

Might have to do with the recurring spotify rate limit?

What version of Home Assistant Core are your running

2024.7.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Alternative

OzGav commented 2 months ago

How are you trying to refresh? Do you press the refresh icon (which may or may not have a red dot on it) image

DanielHabenicht commented 2 months ago

I tried the following things in many different orders: image image

OzGav commented 2 months ago

The first pic you don't need to do. The second yes but then try this image

DanielHabenicht commented 2 months ago

Alright, so there is a fourth option to synchronize. This worked :D Is it expected to sync automatically?

OzGav commented 2 months ago

They already should https://music-assistant.io/usage/#playlists

Doing the step I just mentioned is only required if you refresh manually. A red dot should appear on that refresh icon to tell you it needs pressing but it currently isn’t but that is subject to an existing issue https://github.com/music-assistant/hass-music-assistant/issues/2669

DanielHabenicht commented 1 month ago

I had the same problem this week. It did not automatically sync, on pressing the aforementioned refresh button it synchronized. From the log, I can see that the Spotify provider is synching every 180 minutes (default), but it does not seem to pick up on the playlists.

OzGav commented 1 month ago

It is syncing but the frontend is just not updating.

DanielHabenicht commented 1 month ago

What part of the Frontend? Sorry I am not to familiar with the inner workings of music assistant. What I can observe is that the following is not updating the songs:

While the other refresh button does refresh the list but also takes a while to complete. This in my mind shows that there is a backend process triggered for actually syncing this list.

OzGav commented 1 month ago

The refresh button is refreshing the frontend, that is, the view that you are looking at. It is supposed to have a red dot on it to tell you to press it but that is currently inconsistent in my experience.