Merge pull request #173 from iandrewt/google-play-music

Added Google Play Music Desktop Player as a song output source
This commit is contained in:
Dylan Araps 2016-03-25 13:46:10 +11:00
commit 3e2c4c3b53
2 changed files with 5 additions and 0 deletions

View file

@ -1228,6 +1228,10 @@ getsong () {
;;
esac
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /Google Play Music Desktop Player/')" ] && type -p gpmdp >/dev/null 2>&1; then
song="$(gpmdp current)"
state="$(gpmdp status)"
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then
song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " name of current track as string')"
state="$(osascript -e 'tell application "iTunes" to player state as string')"