Skip to content

Commit

Permalink
Search for X in Spotify doesn't work when X is a non-latin #245
Browse files Browse the repository at this point in the history
  • Loading branch information
vdesabou committed May 11, 2018
1 parent a079c19 commit a65ab10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spotify-mini-player/src/action.php
Expand Up @@ -107,9 +107,11 @@
$spotify_command = str_replace('\\', '', $spotify_command);
if (!startsWith($spotify_command, 'activate')) {
exec("osascript -e 'tell application \"Spotify\" to activate'");
exec("osascript -e 'set uri to \"spotify:search:\" & \"$spotify_command\"' -e 'tell application \"Finder\" to open location uri'");
$tmp = 'spotify:search:' . urlencode($spotify_command);
exec("osascript -e 'set uri to \"$tmp\"' -e 'tell application \"Spotify\" to open location uri'");
} else {
exec("osascript -e 'tell application \"Spotify\" to $spotify_command'");

}
return;
}
Expand Down

0 comments on commit a65ab10

Please sign in to comment.