hass-music-assistant
hass-music-assistant copied to clipboard
When using multiple spotify accounts, Liked Songs is inaccessible for all but the first user.
What version of Music Assistant has the issue?
2.0.0b145
What version of the Home Assistant Integration have you got installed?
2024.4.0
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
- [X] Yes
The problem
When adding more than one Spotify account, it appears that accounts added after the first one are unable to access their liked songs playlist from Spotify. So the first account can, but the second account cannot.
How to reproduce
- Add two Spotify accounts to Music assistant
- Click Playlists. Notice only one "Liked Songs" playlist is present (bug)
- Click Browse. Go into either of the Spotify folders, then playlists, then liked songs. You will get the Liked Songs for the account which was added first, regardless of which Spotify folder you are in
Music Providers
Spotify
Player Providers
Airplay
Full log output
2024-05-07 16:56:43.822 INFO (MainThread) [music_assistant] Starting Music Assistant Server (6c1f8323d3b647ea8c4211670e3270fa) version 2.0.0b145 - HA add-on: False - Safe mode: False 2024-05-07 16:56:43.826 INFO (MainThread) [music_assistant.cache] Initializing cache controller... 2024-05-07 16:56:43.883 INFO (MainThread) [music_assistant.music] Using a sync interval of 180 minutes. 2024-05-07 16:56:43.981 INFO (MainThread) [music_assistant.streams] Detected ffmpeg version 6.0.1 with libsoxr support 2024-05-07 16:56:43.981 INFO (MainThread) [music_assistant.streams] Starting server on 0.0.0.0:8097 - base url: http://192.168.1.11:8097 2024-05-07 16:56:43.989 INFO (MainThread) [music_assistant.webserver] Starting server on 0.0.0.0:8095 - base url: http://192.168.1.11:8095 2024-05-07 16:56:44.155 INFO (MainThread) [music_assistant] Loaded music provider Music Assistant 2024-05-07 16:56:44.155 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider 2024-05-07 16:56:44.155 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider 2024-05-07 16:56:44.155 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider 2024-05-07 16:56:44.208 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant 2024-05-07 16:56:44.211 INFO (MainThread) [music_assistant.music] Sync task for Music Assistant completed 2024-05-07 16:56:44.552 INFO (MainThread) [music_assistant] Loaded player provider Airplay 2024-05-07 16:56:44.555 INFO (MainThread) [music_assistant.players] Player registered: ap0006784c9606/living room amp 2024-05-07 16:56:45.033 INFO (MainThread) [music_assistant.providers.spotify] Successfully logged in to Spotify as g6dooe8tmjz3shi3n95fistuj 2024-05-07 16:56:45.033 INFO (MainThread) [music_assistant] Loaded music provider Spotify 2024-05-07 16:56:45.104 INFO (MainThread) [music_assistant] Loaded music provider YouTube Music 2024-05-07 16:56:45.155 INFO (MainThread) [music_assistant] Loaded player provider Home Assistant MediaPlayers 2024-05-07 16:56:45.177 INFO (MainThread) [music_assistant.players] Player registered: media_player.lg_webos_smart_tv/Living Room TV 2024-05-07 16:56:45.177 INFO (MainThread) [music_assistant.players] Player registered: media_player.master_bedroom_tv/Master Bedroom TV 2024-05-07 16:56:49.097 INFO (MainThread) [music_assistant.providers.spotify] Successfully logged in to Spotify as azelphur 2024-05-07 16:56:49.097 INFO (MainThread) [music_assistant] Loaded music provider Spotify 2024-05-07 16:57:09.300 INFO (MainThread) [music_assistant.music] Sync task for Spotify completed 2024-05-07 16:57:10.488 INFO (MainThread) [music_assistant.music] Sync task for YouTube Music completed 2024-05-07 16:57:34.843 INFO (MainThread) [music_assistant.music] Sync task for Spotify completed 2024-05-07 16:59:28.363 INFO (MainThread) [music_assistant.streams] Start Queue Flow stream for Queue Living Room Amplifier - crossfade: False 2024-05-07 17:03:17.107 INFO (MainThread) [music_assistant.streams] Finished Queue Flow stream for Queue Living Room Amplifier
Additional information
I'm on the discord and happy to help test things out / debug the problem. Just let me know. Thanks again :)
What version of Home Assistant Core are your running
2024.5.2
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)
This one should be fixed in beta 148
small correction: its in the RC1 release (it didnt make it into b148)
Thanks for your work on this! sadly it seems to still be not working in RC1.
Browse -> Spotify -> Top one -> Playlists -> Liked Songs azelphur takes me to liked songs hollowhorrorgirl
Browse -> Spotify -> Bottom one -> Playlists -> Liked Songs Hollowhorrorgirl takes me to liked songs hollowhorrorgirl (correct)
Playlists section only contains a "Liked Songs" playlist for hollowhorrorgirl. The "Liked Songs" for azelphur is missing from the Playlists section.
Video here, in case it's helpful
As perhaps a similar issue to this ticket, it would be nice if the folders were named such that you could differentiate between the two, perhaps "Spotify (username)" instead of just "Spotify"
Are you 100% sure you updated ? because the name addition is exactly what we did. Maybe try it with the 2.0.0 release that is now out. It should work
My video in the previous comment shows the version, 2.0.0rc1.
Updated to 2.0.0 and it's still the same.
In case it's relevant, I'm running the docker container ghcr.io/music-assistant/server:2
Please try again with the latest versions
Still seems broken, Running 2.0.4 (docker latest tag). Just to check, I'm not supposed to be doing anything apart from updating and checking, not resetting my database or something?
Browse -> Spotify (Top one) -> Playlists -> Liked Songs azelphur Title: Liked Songs Hollowhorrorgirl (incorrect) Subtitle: azelphur (correct) Tracks: Are from azelphurs playlist (correct)
Browse -> Spotify (Bottom one) > Playlists -> Liked Songs Hollowhorrorgirl Title: Liked Songs Hollowhorrorgirl (correct) Subtitle: Hollowhorrorgirl (correct) Tracks: Are from azelphurs playlist (incorrect)
Playlists -> Search -> "liked songs" Only one result, "Liked Songs Hollowhorrorgirl" (incorrect, Liked Songs azelphur is missing) Click "Liked Songs Hollowhorrorgirl" and I get: Title: Liked Songs Hollowhorrorgirl (correct) Subtitle: Hollowhorrorgirl (correct) Tracks: Are from azelphurs playlist (incorrect)
I did multiple attempts to reproduce this and I couldnt. Multiple spotify accounts get their own unique Liked songs, also the content is correct. So maybe this issue has been fixed a while ago but the playlists are in your db with the wrong ids.
In that case only a re-add of both providers (or even a full reinstall) would solve it. Maybe create a backup try a fresh install and if that has the same issue revert the backup ?
@Azelphur Please confirm if you have tried Marcel's solution above?
Maybe also someone else with multiple spotify accounts can test this ? I added 2 apotify accounts and both have their own unique listings.
After a database reset, I think this issue is fixed, however I'm now encountering a different issue. My liked songs retrieve fine, but, for my partner, I get
2024-06-16 14:21:22.872 ERROR (MainThread) [music_assistant.webserver] Error handling message: music/playlists/get_playlist: 400, message='Bad Request', url=URL('https://api.spotify.com/v1/playlists/liked_songs-spotify--iYXPhSNV?market=from_token&country=from_token')
But I think this is a separate issue, playlists besides liked songs do load fine. Happy to close this one, thanks for your help :)