codyfish / ulauncher-mpd

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

Feature request: Add support for audio control (vol+, vol-, mute?) #2

Closed ragusa87 closed 4 years ago

ragusa87 commented 4 years ago

Hi, Thanks for this extensions. I find out that one key feature is missing. It lack an option to be able to control the volume from the launcher. I can't change the local volume (volume +10%, volume -10%) as I am using a remote MPD server, with dedicated speakers. Any plans to implement this ?

Thanks for you great work on this. Helps me everyday. Cheers,

Laurent.

codyfish commented 4 years ago

That's a good idea. It seems to be possible quite easily so I'll see what I can do. I hope you are not anymore using the python 2 version as I will probably not update it any more.

ragusa87 commented 4 years ago

That's cool. Well I agree with you, you should totally focus on the Python 3 version, as Python 2 is not supported anymore officially.

codyfish commented 4 years ago

I have added volume-up(vu) and volume-down(vd). The default step can be adjustet in the settings, alternatively you should be able to add a number afterwards to specify the step. I've also added shuffle options and when inserting a song etc random gets turned of in order to actually hear the song as next song.

Please let me know if it works for you (especially remotely, as I have never tested anything with a remote server before)

ragusa87 commented 4 years ago

Cool ! Thanks for the quick add. :heart_eyes: Volume up/down works perfectly fine. Random too.

Concerning the "add" functionality, I can't use it at all using a remote server as your plugin except all the files to be physically on the same computer.

This is why:

Ex: Locally: ~/data/music/Archive/Axiom (2014)/01 - Distorted Angels.mp3 Remotely: music/Archive/Axiom (2014)/01 - Distorted Angels.mp3

Thanks for the work anyway.

codyfish commented 4 years ago

For searching it only uses the mpd client, the problem is album art preview. I have had this issue for a while now, but I think I found an easy fix(just ignore the error when no album art is found). Could you report back if it works now?

ragusa87 commented 4 years ago

Hi, no it doesn't. I type "mpd artist-add" and press enter I got an entry with "loading..." I type "mpd artist-add muse" I got an entry with "loading..." and an exception in the console.

Maybe it should be handled in a different issue ?

mpd.base.CommandError: [2@0] {list} should be "Album" for 3 arguments [<Action.ADD_ARTIST: 13>] Traceback (most recent call last): File "/usr/lib/python3/dist-packages/ulauncher/api/client/Client.py", line 54, in on_message self.extension.trigger_event(event) File "/usr/lib/python3/dist-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event action = listener.on_event(event, self) File "/home/laurent/.local/share/ulauncher/extensions/com.github.codyfish.ulauncher-mpd/main.py", line 35, in on_event return self.__mpd_controller.query(event.get_argument()) File "/home/laurent/.local/share/ulauncher/extensions/com.github.codyfish.ulauncher-mpd/MpdController.py", line 89, in query return Results.list_music(self.client, self.album_art_cache, command_suggestions[0], args) File "/home/laurent/.local/share/ulauncher/extensions/com.github.codyfish.ulauncher-mpd/Results.py", line 144, in list_music return list_artists(client, album_art_cache, Action.ADD_ARTIST, args) File "/home/laurent/.local/share/ulauncher/extensions/com.github.codyfish.ulauncher-mpd/Results.py", line 199, in list_artists artist_results = client.list('artist', "(artist =~ '(?i){}.*$')".format(args)) File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 381, in mpd_command return wrapper(self, name, args, callback) File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 473, in _execute return retval() File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 371, in command_callback res = self._wrap_iterator(res) File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 560, in _wrap_iterator return list(iterator) File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 279, in _parse_list for key, value in self._parse_pairs(lines): File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 219, in _parse_pairs for line in lines: File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 538, in _read_lines line = self._read_line() File "/usr/local/lib/python3.6/dist-packages/mpd/base.py", line 527, in _read_line raise CommandError(error) mpd.base.CommandError: [2@0] {list} should be "Album" for 3 arguments

codyfish commented 4 years ago

I opened a new issue. https://github.com/codyfish/ulauncher-mpd/issues/3 Could you answer some questions there as I do not have this issue at all?