Skip to content

Commit

Permalink
Add beginnings of "previous song" action
Browse files Browse the repository at this point in the history
For some reason, this action doesn't work. When you trigger the action
in LaunchBar, you can *see* it clicking the "previous song" button in the
Sonos UI, but Sonos doesn't actually go to the previous song. 🤷‍♂️

xref: b551555
  • Loading branch information
jasonrudolph committed Mar 19, 2017
1 parent b551555 commit 008c89f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
39 changes: 39 additions & 0 deletions sonos-previous-song.lbaction/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>previous-song.png</string>
<key>CFBundleIdentifier</key>
<string>com.jasonrudolph.LaunchBar.action.SonosPreviousSong</string>
<key>CFBundleName</key>
<string>Sonos - Previous Song</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LBDescription</key>
<dict>
<key>LBAuthor</key>
<string>Jason Rudolph</string>
<key>LBRequirements</key>
<string>Sonos Controller for Mac v7.1</string>
<key>LBSummary</key>
<string>Go back to the previous song in the macOS Sonos app</string>
<key>LBTwitter</key>
<string>@jasonrudolph</string>
<key>LBWebsiteURL</key>
<string>http://jasonrudolph.com</string>
</dict>
<key>LBRequiredApplication</key>
<string>com.sonos.macController</string>
<key>LBRequirements</key>
<string>Sonos Controller for Mac v7.1</string>
<key>LBScripts</key>
<dict>
<key>LBDefaultScript</key>
<dict>
<key>LBScriptName</key>
<string>default.scpt</string>
</dict>
</dict>
</dict>
</plist>
File renamed without changes
5 changes: 5 additions & 0 deletions sonos-previous-song.lbaction/Contents/Scripts/default.scpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tell application "System Events"
tell process "Sonos"
click button 2 of window 1
end tell
end tell

0 comments on commit 008c89f

Please sign in to comment.