From 31b2c50e9c9beeb545270ea67c2bd7b080cb5969 Mon Sep 17 00:00:00 2001 From: Max Demian Date: Thu, 11 Jun 2015 15:58:31 +0200 Subject: [PATCH] bump to 1.8.7 (fix playpause button) --- README.md | 1 + blockify/blockifyui.py | 5 ++++- blockify/interludeplayer.py | 4 ++-- blockify/util.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a4e18c7..588aec2 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ http://skyserver5.skydisc.net:8000 You can use relative and absolute paths as well as basically any audio source/format, as long as you have the respective gstreamer codec installed. ## Changelog +- v1.8.7 (2015-06-11): Pressing play will now properly pause interlude music before resuming spotify playback. - v1.8.6 (2015-05-10): Minor refactoring and removed incomplete "fix" for [issue #44](https://github.com/mikar/blockify/issues/44). - v1.8.5 (2015-05-09): Signal cleanups and [issue #44](https://github.com/mikar/blockify/issues/44) again. - v1.8.4 (2015-05-08): Add additional signals for both spotify and interlude controls (prev/next/playpause, ...), see Controls/Actions section in this README diff --git a/blockify/blockifyui.py b/blockify/blockifyui.py index e567dde..3b89a1b 100755 --- a/blockify/blockifyui.py +++ b/blockify/blockifyui.py @@ -919,7 +919,10 @@ def on_togglelist(self, widget): self.editor.destroy() def on_toggleplay_btn(self, widget): - self.b.dbus.playpause() + if not self.b.spotify_is_playing(): + self.b.player.try_resume_spotify_playback(True) + else: + self.b.dbus.playpause() def on_next_btn(self, widget): self.b.next() diff --git a/blockify/interludeplayer.py b/blockify/interludeplayer.py index dacf655..8939768 100755 --- a/blockify/interludeplayer.py +++ b/blockify/interludeplayer.py @@ -137,8 +137,8 @@ def is_valid_uri(self, item): return not any(exclusions) and any(valid_format) - def try_resume_spotify_playback(self): - if self.is_playing() and not self.b.found: + def try_resume_spotify_playback(self, ignore_player=False): + if (self.is_playing() or ignore_player) and not self.b.found: self.pause() if not self.b.spotify_is_playing(): self.b.dbus.playpause() diff --git a/blockify/util.py b/blockify/util.py index 9258cc2..3f15ab5 100755 --- a/blockify/util.py +++ b/blockify/util.py @@ -11,7 +11,7 @@ except ImportError: log.error("ImportError: Please install docopt to use the CLI.") -VERSION = "1.8.6" +VERSION = "1.8.7" CONFIG = None CONFIG_DIR = os.path.join(os.path.expanduser("~"), ".config/blockify") CONFIG_FILE = os.path.join(CONFIG_DIR, "blockify.ini")