You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
Hey! Wanted to get this working on my Mac, so I used the following script to generate a file that gets updated from what's playing in Spotify. This doesn't give you nearly the range of service support you get with Snip, but in my case it's all I need. Might be worth a note in the README if people are interested in getting it working on macOS.
neptune:tmp synapses$ cat nowPlaying.osascript
#!/usr/bin/osascript
#
# now_playing.osascript
#
# Osascript to fetch the meta data of the currently playing
# track in Spotify. This works only on Mac OS X.
tell application "System Events"
set myList to (name of every process)
end tell
if myList contains "Spotify" then
tell application "Spotify"
if player state is stopped then
set output to "---"
else
set trackname to name of current track
set artistname to artist of current track
set albumname to album of current track
if player state is playing then
set output to trackname & " | " & artistname
else if player state is paused then
set output to trackname & " | " & artistname & " | " & "Paused"
end if
end if
end tell
else
set output to "---"
end if
Thanks for publishing the project! I ended up combining with this with the Spotify Connect web API and running both scripts on my VPS so it always gets updated no matter what I'm playing from (I listen on my phone a lot).
The text was updated successfully, but these errors were encountered:
Hey! Wanted to get this working on my Mac, so I used the following script to generate a file that gets updated from what's playing in Spotify. This doesn't give you nearly the range of service support you get with Snip, but in my case it's all I need. Might be worth a note in the README if people are interested in getting it working on macOS.
Thanks for publishing the project! I ended up combining with this with the Spotify Connect web API and running both scripts on my VPS so it always gets updated no matter what I'm playing from (I listen on my phone a lot).
The text was updated successfully, but these errors were encountered: