Help Wizard

Step 1

NEXT STEP

Applescript Bugs

Applescript Bugs

Hi. 

 

I've found two bugs with the Applescript support, valid in the latest version, 1.0.3.101:

   

1. the "artwork" returned for the "current track" is always null. It used to work before, but I don't exactly in which version it stopped working:

 

missingArtwork.png

 

 

   2. the "player position" property does not return an up-to-date value from Spotify. It seems to keep returning the same old value, instead of the value currently shown in Spotify. Spotify always returned "111" seconds , even though the song was playing:

 playerPositionSpotify.png

 

On the other hand, iTunes behaves as expected, returning an up-to-date value:

 

playerPositioniTunes.png

 

 

3. As a bonus,  it would be nice and if the "starred" property on a "Spotify Track" were made writeable. 

 

 

Cheers.

Reply
29 Replies

Hi there and welcome to the community,

 

Thank you for your feedback. Applescript has recently been added to the new client. 

I will ping the staff about these issues.


What's a Spotify Rock Star, and how do I become one?
Last.fm | Twitter

Backstage Intro - Meet Jordi!
What's it like to be in a Spotify Office?


Did I help? Please add a like!
Did I solve your issue? Please accept as the solution!


Hey @Racker,

 

Welcome to the Community.

 

Thanks for your feedback on this, we've passed it on to the right team.

 

They're working hard to improve this. Hopefully we'll some news soon.

 

Thanks!

 

 

 

 

 

Do you plan on updating the album artwork script? I use Finely Tuned and it no longer sends that data. It's a great enhancement to

using Spotify on the Mac. Thanks.

Hey Pricilla

Any news?

Does this kind of thing happen often? I'm releasing a music player soon that depends on the Spotify AppleScript API. I cannot release it until the API is working properly again.

Hey iluuu. 

 

Here's a very quick overview of my experience. I've been using Spotify's AppleScript support since January 2015, when it was at v0.9.13. 

 

Since then:

    - in v1.0.2, Applescript support was accidentaly removed (there was a typo in the Info.plist)

    - in v1.0.2 (or v1.0.3) I've found the bugs present in this thread. 

 

 

So the Applescript support is a bit unstable, but I'm guessing that it will become much more stable as time goes by. 

I see, thanks for this nice summary!

Is there any update on the "player position" script value getting fixed? Because that's kinda annoying for certain use cases if that never updates!

No updates. They can't fix it since January. They don't care.

More info on the "player position" AppleScript bug:

- As previously noted, the value returned does not update as the track plays, making it useless.

- In fact, it seems to always display the last value it was set to, either by using AS to "set player position to 88", for example, or by clicking on the progress bar to change the position.

-- The returned value, which is documented to return a real number in seconds in fact now returns a number in milliseconds.

 

tell application "Spotify"
    set player position to 88
    log (player position as text) --> 8.8614E+4
    delay 5
    log (player position as text)--> 8.8614E+4
    delay 5
    log (player position as text)--> 8.8614E+4
    delay 5
    log (player position as text)--> 8.8614E+4
end tell

 

--> 8.8614E+4 = 88614 milliseconds = 88.614 seconds

 

The recent misplacement of the Spotify.sdef file, of returning NULL for all artwork, and the "player position" errors are all novice programmer mistakes, and show a systemic lack of unit and regression testing on the part of Spotify. Pitiful!

 

The solution for this issue is really overdue... When can we expect a patch??

My customers are waiting 😕

I would really appreciate a fix as well.

The bugs are still present 1.0.7. 

 

We'd really appreciate a fix. I realise you're busy pumping out features, but these bugs seem easy to fix.

Hi, nice that AS came back at all! 😉

 

But now (for some weeks) the "player position" property always returns the last set value (set either by Applescript or track change). This essentially makes the property useless.

 

Certainly it was an oversight, looks more like this can be fixed in a few minutes.

 

Me and about six other people would be psyched if you restore the "player position" property. Thanks and keep up the good work!

Bildschirmfoto 2015-06-27 um 14.20.45.PNG

I concur with everyone in this thread. Spotify team, please fix the few remaining Applescript bugs! My scripts rely on the player position property and have been broken since Applescript came back. 😞  The issues appear to be totally trivial in nature and we would all greatly appreciate it if someone took a few hours to get fixes into the next release. Thanks!

 

I am using 1.0.8.59.gee82e7e6

THIS IS A FIX!

 

Quick and dirty fix for the "player position" bug.

 

Throw in a pair of "playpause" toggles just before reading the player position. Spotify won't actually have time to pause the playing, but it will update its AppleEvent queue and return fresh values every time you call it. Like this:

 

playpause
playpause
get player position

 

Applescript artwork still broken in 1.0.9.133.gcedaee38

please fix the applescript artwork bug, it's still broken in 1.0.10.107.gd0dfca3a

"player position" bug still present on 1.0.11.134.ga37df67b version..

Still unable to get the artwork via AppleScript or the Scripting Bridge in Cocoa. I take it Spotify developers don't consider this a particularly high priority bug ?! 

Suggested posts