hass-music-assistant
hass-music-assistant copied to clipboard
Server: Issue adding multiple tracks to a playlist
What version of Music Assistant has the issue?
2.0.0b70
The problem
I'm trying to set up my playlists in MA but when I try to add multiple tracks to a playlist I'm having trouble. Adding one by one works, but when I try to add multiple I get errors in the logs that look like:
2023-08-07 22:06:24.325 WARNING (MainThread) [music_assistant.providers.filesystem_smb] Could not parse uri/file filesystem_smb://track/Example - Example.mp3ample2.mp33 to track: track://Example - Example.mp3ample2.mp33 not found on provider filesystem_smb
and the garbled file paths also appear in the m3u file for the playlist. Looks like the line in the file is being overwritten for each track instead of a new line being added, or something like that?
Files and playlists are all on an SMB share, to be clear and just in case it's relevant.
How to reproduce
- Click "select multiple items" in the top bar of a track list
- Select some items
- From actions, add them to a playlist
Relevant log output
2023-08-07 22:06:24.325 WARNING (MainThread) [music_assistant.providers.filesystem_smb] Could not parse uri/file filesystem_smb://track/Example - Example.mp3ample2.mp33 to track: track://Example - Example.mp3ample2.mp33 not found on provider filesystem_smb
Additional information
No response
What version of Home Assistant Core are your running
2023.7.x
What type of installation are you running?
Home Assistant Core
On what type of hardware are you running?
Raspberry Pi
Similar issue already reported. This will be addressed soon.
@krisnoble I can’t recreate this in b74. Is this still a problem for you?
Yeah, still happening for me on b74
Can you give a clear step by step so I can try and recreate it and make sure I am on the same view.
Sure. This is from artist view but not sure if same applies elsewhere, I assume so. Side note not sure why the tick boxes are above the cover like that, are they the same for you?
Doesn't seem to matter if it's a new playlist or existing.
Weirdly, in testing I've found that the behaviour is not always the same. Sometimes both get added correctly, sometimes just one of the two, and sometimes the issue with one being written over the top of the other.
I guess if the longer track name gets written over the shorter one, it just looks as if it's only that track that's been written, but I have had times when just the shorter one turns up too.
I don't know async well enough yet to know the correct terms but I wonder if there's like a race condition happening if multiple tasks get started to update the playlist file?
Edit: just did another test with three tracks selected and got this, one line added correctly but one garbled one, don't know if that helps narrow down the search area...
filesystem_local://track/Muse/Absolution/08 Hysteria.mp3ing Out.mp3
filesystem_local://track/Muse/Will Of The People/04 Won't Stand Down.mp3
Yes I believe I can recreate this. It will be looked at in due course
When I tried this, with tidal tracks recently, it worked without issue, has this actually already been fixed?
I’m trying local provider and it isn’t working. Only the first track is added?
I’m trying local provider and it isn’t working. Only the first track is added?
That makes sense then as I guess the issue was specific to local provider to begin with. I'll try to setup a local provider and do some tests. You can assign this one to me unless @marcelveldt is already working on it
And this one @jozefKruszynski ?
@krisnoble playlists have been reworked. Please confirm this issue is resolved
With the new playlist functionality this is working for me so closing.