Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

[Connect] Recent update broke AppleScript for Spotify Connect (slightly)

Solved!

[Connect] Recent update broke AppleScript for Spotify Connect (slightly)

Hi! 
It seems like a fairly recent update broke the reporting of currently playing track via AppleScript, when music is being played back using the Mac app, but from a different device - via Spotify Connect. It reports normally when music is played from the same device. It also doesn't happen for all devices: it reports normally for my phone, but doesn't for my room soundsystem (via raspberry pi + raspotify). 

I did not see a "bug report" section, and decided to post here, if I should be redirected please let me know.

The version I'm using is 1.1.9.383.g9f48828e, it broke around a week ago for me. Is it possible to downgrade in a case like this? All advice appreciated.

An example AppleScript snippet that was previously working fine, but now doesn't:

if application "Spotify" is running then
	tell application "Spotify"
		if player state is playing then
			return (get name of current track)
		else
			return ""
		end if
	end tell
end if
return ""



Reply

Accepted Solutions
11 Replies

Yep - I got the same thing except it doesn't work for anything. Super annoying.

The only thing that seems to work for tracks is the duration at the moment..

On a Mac with the same version of Spotify and I'm having the same issue. Like OP said, it works fine when I'm playing from the Mac, but when using Spotify to play to a Google Home it breaks. For some reason duration, the artwork, and Spotify url of the current track work but not others like name and artist. Tried messing around with the sdef but it looks like the sdef is the same in older versions.

 

For me it also seems only my Google Home gives Spotify issues. When I play music from Spotify on my phone, my AppleScript still works on the Mac. When I switch to the Google Home, it stops working so it might have to do with how Google interfaces with Spotify. From the Spotify app it's technically treated differently, and says "Spotify Connect" when playing from my phone but "Google Cast" when playing from the Google Home.

I am seeing this issue as well with Spotify 1.1.10.540.gfcf0430f. See details at https://github.com/serban/menubar-ticker/issues/2#issuecomment-513571889.

Can confirm I'm also experiencing this issue.

It seems to be back working with 1.1.12.451.gdb77255f!

Not working with 1.1.17.545.g74ed9ff1 😞

I also ran into this!

Yeah, same here!

Yeah still not working with c1.1.25.559.g85cf5e4c

 

The weird thing that is sometimes work! Usually it requires a restart of Spotify - but it only works for a couple of times and then it stops and never comes back. 

 

I use it to (or used it to) display the name of the current track on the touch bar..

Marked as solution

Yeah! It's been working for me for some weeks now! Hopefully it stays that way now! 😄

 

Suggested posts