Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid track id in playlist, but it isn't in the interface #1087

Closed
phirestalker opened this issue Sep 8, 2023 · 6 comments
Closed

Invalid track id in playlist, but it isn't in the interface #1087

phirestalker opened this issue Sep 8, 2023 · 6 comments
Labels

Comments

@phirestalker
Copy link

I am getting an invalid track id error. I have an old copy of the database and know what song it referred to. It is indeed invalid now, but I do not see the song when viewing the playlist in the interface. How can I remove the song if it is not in the interface?

Nextcloud docker: 26.0.5
Nextcloud Music: 1.8.4

Error

{"reqId":"Fg0DKI92kqdRgpII9Xo7","level":0,"time":"2023-09-08T15:00:47+00:00","remoteAddr":"10.254.0.9","user":"--","app":"music","method":"GET","url":"/apps/music/subsonic/rest/getPlaylist.view?u=user&p=enc:__redacted__&v=1.2.0&c=DSub&id=23","message":"Invalid track ID 17840 found on playlist 23","userAgent":"DSub","version":"26.0.5.1","data":{"app":"music"}}
@paulijar
Copy link
Collaborator

paulijar commented Sep 8, 2023

You are right, I tested it and can confirm that the invalid tracks are not shown on the web UI. I think they have been shown in some earlier version as an empty row which could be removed through the web UI. I'm not sure about when and why has this changed.

As a workaround, you should get rid of the invalid track ID if you export the playlist to a file and then import it again as a new playlist.

@phirestalker
Copy link
Author

Thanks, I figured that out. I was worried that it would export the bad track, but then I remembered that playlists are a text file. I was also unsure the paths would line up. It uses relative paths, so all worked out well.

Also, is there any way to kind of reverse the import ui flow? Something like, I select import playlist and it creates a new playlist with the file name to import the tracks to.

@paulijar
Copy link
Collaborator

paulijar commented Sep 9, 2023

Also, is there any way to kind of reverse the import ui flow? Something like, I select import playlist and it creates a new playlist with the file name to import the tracks to.

This can be achieved by opening the playlist file within the Files view. There, select the three dots next to the list name in the player pane and "Import list to Music"
image

I haven't created such feature within the Music app proper since I couldn't figure out any natural location on the UI for this feature.

@phirestalker
Copy link
Author

@paulijar. That works just fine. Thanks.
Since I found a workaround, do I close the issue?

@paulijar
Copy link
Collaborator

paulijar commented Sep 9, 2023

Maybe we could leave this open for now. I'd like to improve the handling of this case at some point so that no work-around would be needed.

paulijar added a commit that referenced this issue Oct 8, 2023
The Subsonic method `getPlaylist` used to fail with an uncaught exception if
the playlist in question contained any references to tracks which do not
exist. This had actually been already fixed once in eae36b8 but then
accidentally reintroduced with e45282e in the v1.8.0.

refs #1087
paulijar added a commit that referenced this issue Oct 8, 2023
If the viewed playlist contains any references to tracks which do not exist,
the corresponding line on the UI now shows "ERROR: invalid track". This way,
it's easy for the user to remove those invalid references from the playlists.

refs #1087
@paulijar paulijar added the Bug label Oct 8, 2023
@paulijar
Copy link
Collaborator

paulijar commented Oct 9, 2023

The Music v1.9.1 is now out with two related fixes:

  1. The playlist can now be loaded via the Subsonic API even if the list contains some broken track references.
  2. The broken track references are now visible on the web UI as "ERROR" lines. This makes it possible to remove them manually.

@paulijar paulijar closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants