Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When changing to prev/next track, notifications show currently playing track #61

Closed
garyking opened this issue Apr 30, 2015 · 1 comment · Fixed by #63
Closed

When changing to prev/next track, notifications show currently playing track #61

garyking opened this issue Apr 30, 2015 · 1 comment · Fixed by #63

Comments

@garyking
Copy link

If I go to the prev/next track, the notification shown shows the track that was playing before the track change, rather than the new one.

@scotje
Copy link

scotje commented Dec 28, 2015

A quick fix for this is to insert a 0.1 second delay into the AppleScript that gets run when changing tracks.

So change this line: https://github.com/citelao/Spotify-for-Alfred/blob/master/src/citelao/Spotifious/Spotifious.php#L190

from this:

$as = new ApplicationApplescript("Spotify", $query . " \n return name of current track & \"\" & album of current track & \"\" & artist of current track & \"\" & spotify url of current track & \"\" & player state");

to this:

$as = new ApplicationApplescript("Spotify", $query . " \n delay 0.1\n return name of current track & \"\" & album of current track & \"\" & artist of current track & \"\" & spotify url of current track & \"\" & player state");

To find the PHP file, open the Spotifious workflow, double click on the "Run Script" element, click "Open workflow folder" in the bottom right, and then browse to "src/citelao/Spotifious" in that folder and open Spotifious.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants