Skip to content

Instantly share code, notes, and snippets.

@spiffin
Created March 2, 2015 20:00
Show Gist options
  • Save spiffin/1e6ca90880bc828060b3 to your computer and use it in GitHub Desktop.
Save spiffin/1e6ca90880bc828060b3 to your computer and use it in GitHub Desktop.
AppleScript to play LMS favorites (Logitech Media Server)
set serverIP to "192.168.1.80" --change to your server IP
--Your first favorite has an item_id of 0, the second=1, third=2, etc.
--So, to play your first favorite:
do shell script "printf \"favorites playlist play item_id:0\nexit\n\" | nc " & serverIP & " 9090"
--Second:
--do shell script "printf \"favorites playlist play item_id:1\nexit\n\" | nc " & serverIP & " 9090"
--Fifth:
--do shell script "printf \"favorites playlist play item_id:4\nexit\n\" | nc " & serverIP & " 9090"
--etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment