diff --git a/usr/lib/hypnotix/hypnotix.py b/usr/lib/hypnotix/hypnotix.py index 4885ac5..fbcdd84 100755 --- a/usr/lib/hypnotix/hypnotix.py +++ b/usr/lib/hypnotix/hypnotix.py @@ -876,6 +876,7 @@ def on_next_channel(self): def play_async(self, channel): if self.mpv is not None: self.mpv.stop() + self.mpv.pause = False print("CHANNEL: '%s' (%s)" % (channel.name, channel.url)) if channel is not None and channel.url is not None: # os.system("mpv --wid=%s %s &" % (self.wid, channel.url)) @@ -1449,6 +1450,7 @@ def on_menu_quit(self, widget): self.application.quit() def on_key_press_event(self, widget, event): + channel_focused = self.fullscreen or "ChannelWidget" in widget.get_focus().get_name() # Get any active, but not pressed modifiers, like CapsLock and NumLock persistant_modifiers = Gtk.accelerator_get_default_mod_mask() @@ -1481,6 +1483,11 @@ def on_key_press_event(self, widget, event): self.on_prev_channel() elif event.keyval == Gdk.KEY_Right: self.on_next_channel() + return True + elif event.keyval == Gdk.KEY_space: + if channel_focused: + self.on_pause_button(widget) + return True # elif event.keyval == Gdk.KEY_Up: # # Up of in the list # pass