I did have a few things connected to the "local iTunes plugin", which doesn't work in Catalina. The good news is I've managed to cobble together a few AppleScripts for Music to do what I need... and then have Indigo run a shell script that runs the apple script. Although a bit "clumsy", this works fine. Then found out that I could invoke an AppleScript directly in the shell script, which meant one less step to get things done. With my tiny toolkit that know and understand, I can easily see my way to accomplish everything I think I'll need in replacing some of the local iTunes plugin functions. it may not be pretty, but is simple, and easy for me to understand and adjust as necessary.
The only issue is those shell scripts all reside on the Indigo Server, which doesn't have a monitor attached, so I have to VNC into the server to make any changes and adjustments. Not a big deal really, but requires one step I wish I didn't have to take. So I'm wondering if it's possible to convert these small scripts to embedded Python scripts, so I can more easily edit them from the Indigo Client on my desktop. I have a handful of scripts like this but getting just this one converted, if possible, will guide me thru to success with the others.
Here is the original Apple Script
- Code: Select all
tell application "Music"
play playlist named "LinnClassical"
tell application "Music" to set selected of AirPlay device "Denon AVR-X4000" to true
delay 10.0
tell application "Music" to set sound volume of AirPlay device "Denon AVR-X4000" to 25
end tell
And although not exactly the same, here is the shell script:
- Code: Select all
#!/bin/zsh
osascript -e 'tell application "Music" to play playlist "LinnClassical"'
osascript -e 'tell application "Music" to set selected of AirPlay device "Denon AVR-X4000" to true'
osascript -e 'tell application "Music" to set the sound volume to 40'
sleep 10
osascript -e 'tell application "Music" to set sound volume of AirPlay device "Denon AVR-X4000" to 25'