Spotify art geektool7/2/2023 It’s called spotify-art.scpt and is also kept in ~/bin. Here’s the script for getting the album artwork from Spotify and saving it to an image file that NerdTool can access and display. I have NerdTool run it every 10 seconds through the command osascript ~/bin/spotify-playing.scpt 1: on runĤ: set num to count (every process whose name is "Spotify")ġ2: set info to "“" & what & "”" & " by " & who & " I call it spotify-playing.scpt and keep it in my ~/bin directory. Here’s the script that prints the artist, track, and album info. I wouldn’t say the modifications were simply a matter of s/iTunes/Spotify/g, but it wasn’t much more complicated than that. Basically, I made copies of the track info and album art scripts I wrote for iTunes and modified them to work with Spotify. Well, write may be too strong a word for what I did. It took about ten minutes to write the scripts. So I set about making a set of scripts I could have NerdTool run to show the track and album art on my Desktop. As it happens, Spotify has an excellent AppleScript library that mirrors the relevant commands of the iTunes AS library. One thing I was curious about was whether the Spotify application for the Mac had a decent AppleScript library, because I’d want to have the current track information appearing on my Desktop, just as I have for iTunes at work. I will give it a try on my Macbook Air, though, because its “hard drive” is too small to keep an iTunes library on. I don’t see it replacing iTunes on my office computer, mainly because I hate making playlists and don’t know how to get Spotify to do the equivalent of iTunes’ smart playlists (or Pandora’s “music DNA” thing). So, like all the other cool internet kids (in the US), you went off and got yourself a Spotify account today. Next post Previous post Spotify info on the Desktop via NerdTool
0 Comments
Leave a Reply. |