simplified CoverEventBox

This commit is contained in:
Martin Wagner 2022-12-02 18:18:39 +01:00
parent 3bd3d8d687
commit 69e9e33273
1 changed files with 4 additions and 6 deletions

View File

@ -2525,12 +2525,10 @@ class CoverEventBox(Gtk.EventBox):
self._click_pos=(event.x, event.y)
def _on_button_release_event(self, widget, event):
if event.button != 1 or self._click_pos:
if not self._settings.get_boolean("mini-player") and self._client.connected():
if (song:=self._client.currentsong()):
tags=(song["albumartist"][0], song["album"][0], song["date"][0])
if event.button == 1:
self._client.album_to_playlist(*tags, "enqueue")
if event.button == 1 and not self._settings.get_boolean("mini-player") and self._client.connected():
if (song:=self._client.currentsong()):
tags=(song["albumartist"][0], song["album"][0], song["date"][0])
self._client.album_to_playlist(*tags, "enqueue")
self._click_pos=()
def _on_motion_notify_event(self, widget, event):