hass-music-assistant icon indicating copy to clipboard operation
hass-music-assistant copied to clipboard

Server: Issue adding multiple tracks to a playlist

Open krisnoble opened this issue 1 year ago • 9 comments

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

  1. Click "select multiple items" in the top bar of a track list
  2. Select some items
  3. 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

krisnoble avatar Aug 07 '23 22:08 krisnoble

Similar issue already reported. This will be addressed soon.

OzGav avatar Aug 08 '23 13:08 OzGav

@krisnoble I can’t recreate this in b74. Is this still a problem for you?

OzGav avatar Nov 09 '23 12:11 OzGav

Yeah, still happening for me on b74

krisnoble avatar Nov 09 '23 17:11 krisnoble

Can you give a clear step by step so I can try and recreate it and make sure I am on the same view.

OzGav avatar Nov 09 '23 23:11 OzGav

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?

Screenshot 2023-11-10 at 10 17 03 Screenshot 2023-11-10 at 10 17 09

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

krisnoble avatar Nov 10 '23 10:11 krisnoble

Yes I believe I can recreate this. It will be looked at in due course

OzGav avatar Nov 17 '23 11:11 OzGav

When I tried this, with tidal tracks recently, it worked without issue, has this actually already been fixed?

jozefKruszynski avatar Feb 06 '24 06:02 jozefKruszynski

I’m trying local provider and it isn’t working. Only the first track is added?

OzGav avatar Feb 06 '24 08:02 OzGav

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

jozefKruszynski avatar Feb 06 '24 08:02 jozefKruszynski

And this one @jozefKruszynski ?

OzGav avatar Apr 06 '24 14:04 OzGav

@krisnoble playlists have been reworked. Please confirm this issue is resolved

OzGav avatar Apr 16 '24 13:04 OzGav

With the new playlist functionality this is working for me so closing.

OzGav avatar Apr 18 '24 01:04 OzGav