codyfish / ulauncher-mpd

GNU General Public License v3.0
2 stars 2 forks source link

add-song add-album #4

Closed codyfish closed 4 years ago

codyfish commented 4 years ago

Trying to add-song or add-album results in the following exception (this is on Arch):

com.github.codyfish.ulauncher-mpd | 2020-04-12 19:53:26,379 | DEBUG | mpd.base: _write_command() | Calling MPD play('96',) Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/ulauncher/api/client/Client.py", line 54, in on_message self.extension.trigger_event(event) File "/usr/lib/python3.8/site-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event action = listener.on_event(event, self) File "~/.local/share/ulauncher/extensions/com.github.codyfish.ulauncher-mpd/main.py", line 47, in on_event self.__mpd_controller.execute(command) File "~/.local/share/ulauncher/extensions/com.github.codyfish.ulauncher-mpd/MpdController.py", line 97, in execute if not self.ensure_connection(): File "/usr/lib/python3.8/site-packages/mpd/base.py", line 381, in mpd_command return wrapper(self, name, args, callback) File "/usr/lib/python3.8/site-packages/mpd/base.py", line 473, in _execute return retval() File "/usr/lib/python3.8/site-packages/mpd/base.py", line 368, in command_callback res = function(self, self._read_lines()) File "/usr/lib/python3.8/site-packages/mpd/base.py", line 311, in _parse_nothing for line in lines: File "/usr/lib/python3.8/site-packages/mpd/base.py", line 538, in _read_lines line = self._read_line() File "/usr/lib/python3.8/site-packages/mpd/base.py", line 527, in _read_line raise CommandError(error) mpd.base.CommandError: [2@0] {play} Bad song index

I always seem to run into this call: Calling MPD play('96',)

Originally posted by @bretello in https://github.com/codyfish/ulauncher-mpd/issues/3#issuecomment-612652929

codyfish commented 4 years ago

Do the other operations work? what I do not really understand about this is the fact that the line in my code seems to be 97, a line in which clearly play is not called at all and I cannot see from this stacktrace where the call is that causes the error is made. Does it also error with play('96') when the playlist is clear?

bretello commented 4 years ago

Nothing was working at the time. Now everything seems to be working fine, apparently without changing anything on my part. You can close this. Thanks!

codyfish commented 4 years ago

That's nice to hear!