Skip to content

Commit

Permalink
fix(refactoring): remove old imports and other cleanups
Browse files Browse the repository at this point in the history
Merge branch 'release/3.2.1'

* release/3.2.1:
  fix(refactoring): remove unused imports and other fixes
  Update README.md
  fix(docs): manual AUR installation routine
  • Loading branch information
gmdfalk committed Jan 3, 2016
2 parents d12c4bd + 30649fd commit b5af92b
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 119 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ Arch-Linux users can find blockify in the [AUR](https://aur.archlinux.org/packag

Example ArchLinux installation routine:
``` bash
curl -L -O https://aur4.archlinux.org/cgit/aur.git/snapshot/blockify.tar.gz
tar -xvf blockify.tar.gz
git clone https://aur.archlinux.org/blockify.git
cd blockify
makepkg -sri
```
Expand All @@ -38,8 +37,7 @@ echo deb http://repository.spotify.com testing non-free | sudo tee /etc/apt/sour
sudo apt-get update
sudo apt-get install spotify-client
# Install blockify dependencies
sudo apt-get install git python3-docopt python3-pip python-configparser python-gst-1.0
sudo pip3 install requests
sudo apt-get install git python3-requests python3-docopt python3-pip python3-gst-1.0 python-configparser
```

Install routine:
Expand Down Expand Up @@ -83,9 +81,9 @@ Blockify accepts several signals:

Example usages:
```bash
pkill -USR1 -f "python2.*blockify"
pkill -RTMIN+1 -f "python2.*blockify"
alias btoggle='pkill -RTMIN+2 -f "python2.*blockify"'
pkill -USR1 -f "python.*blockify"
pkill -RTMIN+1 -f "python.*blockify"
alias btoggle='pkill -RTMIN+2 -f "python.*blockify"'
```
Bind to keys for fun and profit.

Expand Down Expand Up @@ -172,6 +170,7 @@ If you can't find or fix the issue you are having by yourself, you are welcome t


## Changelog
- v3.2.1 (2016-01-03): Remove unnecessary imports and other cleanups.
- v3.2.0 (2015-12-31): Reintroduce playback status (see [issue #68](https://github.com/mikar/blockify/issues/68))
- v3.1.0 (2015-12-31): Remove wmctrl dependency (see [issue #67](https://github.com/mikar/blockify/issues/67))
- v3.0.0 (2015-10-16): Remove beta status and port to python3 and gstreamer1.0 (see [issue #59](https://github.com/mikar/blockify/issues/59)).
Expand Down
9 changes: 5 additions & 4 deletions blockify/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
from gi import require_version

require_version('Gtk', '3.0')
require_version('Wnck', '3.0')
from gi.repository import Gtk
from gi.repository import Wnck
from gi.repository import GObject

from blockify import dbusclient
from blockify import blocklist
from blockify import interludeplayer
from blockify import util


log = logging.getLogger("cli")


Expand Down Expand Up @@ -208,6 +207,10 @@ def refresh_spotify_process_state(self):

return True

def resume_blockify(self):
self.suspend_blockify = False
return False

def start(self):
self.bind_signals()
# Force unmute to properly initialize unmuted state
Expand Down Expand Up @@ -296,11 +299,9 @@ def unmute_with_delay(self):
return False

def current_song_is_ad(self):
"""Compares the wnck song info to dbus song info."""
return self.dbus.get_song_title() and not self.dbus.get_song_artist()

def get_current_song(self):
"""Checks if a Spotify window exists and returns the current songname."""
return self.dbus.get_song_artist().decode("utf-8") + self.song_delimiter + self.dbus.get_song_title().decode(
"utf-8")

Expand Down
Loading

0 comments on commit b5af92b

Please sign in to comment.