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

Solved!
Reply

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

zzsyn
Regular

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 ""



1 ACCEPTED SOLUTION
Solution!

washikanto
Casual Listener
11 Replies

Masterbas
Casual Listener
Yeah, same here!

rockets
Regular

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..

Solution!

washikanto
Casual Listener

rockets
Regular

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

 

pl_g
Casual Listener

I also ran into this!

marcaddeo
Newbie

Can confirm I'm also experiencing this issue.

rockets
Regular

It seems to be back working with 1.1.12.451.gdb77255f!

radioactive0ne
Newbie
Not working with 1.1.17.545.g74ed9ff1 😞

serbang
Visitor

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.

washikanto
Casual Listener

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.

rockets
Regular

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..

SUGGESTED POSTS