python-mpd2 icon indicating copy to clipboard operation
python-mpd2 copied to clipboard

MPDClient.playid() not working

Open JoergZ2 opened this issue 5 years ago • 2 comments

I try to call a song from playlist by using the function MPDClient.playid() but it throws an error: File "/usr/local/lib/python3.8/dist-packages/mpd/base.py", line 527, in _read_line raise CommandError(error) mpd.base.CommandError: [50@0] {} No such song The number of playid is valid (int and in range)! Function MPDClientplay() works well but for that I've to calculate user input minus 1 because play... counts from 0 an playid should count from 1. Am I missunderstanding playid() or isn't playid() not implemented correctly.

JoergZ2 avatar Sep 10 '20 09:09 JoergZ2

Now I've discovered that the songid is not a absolute identifier, but changes every time a playlist (even if it is the same one) is loaded. So I can only start with a specific song from a playlist if I know the position and use the function MPDClient.play() with the position number. Just out of interest: What purpose should the songid serve?

JoergZ2 avatar Sep 11 '20 07:09 JoergZ2

Not quite sure what the purpose is. Maybe ask upstream on their github tracker or in #mpd on freenode.

Mic92 avatar Sep 22 '20 04:09 Mic92