illusori / bash-itunes Goto Github PK
View Code? Open in Web Editor NEWShell script to control iTunes from the command-line.
Home Page: http://www.illusori.co.uk/projects/bash-itunes/
Shell script to control iTunes from the command-line.
Home Page: http://www.illusori.co.uk/projects/bash-itunes/
Since the last update is 5 Months ago, I think is has to do something with a new iTunes version. Toggling shuffle won't work anymore. I'll look into this.
Would be great to have the option to favorite song (the heart added in iTunes 12)
I am not able to get the 'itunes shuffle' command to work.
According to several iTunes scripting knowledgeable folks the 'Shuffle' command has change in iTunes 11 and up. This Stack Overflow thread discusses the issue. Below are some basic osascripts that work for version 11 and version 12. Even more difficult due to the menu text and function being different between v11 and v12. Beyond my abilities to jump into your script to see if there is a way to get this to work in 'bash-itunes':
osascript - <<EOF;
tell application "System Events" to tell process "iTunes"'s menu bar 1's menu bar item "Controls"'s menu 1's menu item "Shuffle"'s menu 1
perform action "AXPress" of menu item "On"
end tell
EOF
osascript - <<EOF;
tell application "System Events" to tell process "iTunes"'s menu bar 1's menu bar item "Controls"'s menu 1's menu item "Shuffle"'s menu 1
perform action "AXPress" of menu item "Turn On Shuffle"
end tell
EOF
:~/bash-itunes → ./itunes info
Currently playing "" ()
:~/bash-itunes → ./itunes next
Skipping to next track, "" ()
Other than that, it still plays and can skip tracks like normal. I think the structure of the data coming in has changed. I noticed it wasn't able to convert data into a string.
Example of what use to work:
tell application "iTunes" to artist of current track as string'
Output:
Can’t make «class pArt» of «class pTrk» of application "iTunes" into type string. (-1700)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.