This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Lastfm loved tracks to Google Music All Access playlist. As noted in the comments you do need the All Access subscription thing otherwise it will always find 0 songs. | |
# | |
# Written by Tim Hutt, [email protected], based on this script: | |
# | |
# https://gist.github.com/oquno/3664731 | |
# | |
# Today is the 15th of September 2013. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This isn't pretty but it works. | |
tell application "Spotify" | |
set old_volume to sound volume | |
repeat | |
if player state is playing then set current_album to album of current track | |
if player state is playing and (current_album starts with "http://" or current_album starts with "https://" or current_album starts with "spotify:") then | |
set sound volume to 0 | |
play | |
else |