Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
7af85aae
Unverified
Commit
7af85aae
authored
Feb 13, 2019
by
Robby Russell
Committed by
GitHub
Feb 13, 2019
Browse files
Merge pull request #7567 from genevera/PLUGIN-update-shpotify_7567
Plugin: Updates spotify plugin to current master (as of 2019-01-31)
parents
ca978897
e634730e
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/osx/spotify
View file @
7af85aae
#!/usr/bin/env bash
function
spotify
()
{
# Copyright (c) 2012--201
7
Harish Narayanan <mail@harishnarayanan.org>
# Copyright (c) 2012--201
8
Harish Narayanan <mail@harishnarayanan.org>
#
# Contains numerous helpful contributions from Jorge Colindres, Thomas
# Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin
...
...
@@ -134,8 +134,13 @@ showStatus () {
if
[
$#
=
0
]
;
then
showHelp
;
else
if
[
!
-d
/Applications/Spotify.app
]
&&
[
!
-d
$HOME
/Applications/Spotify.app
]
;
then
echo
"The Spotify application must be installed."
exit
1
fi
if
[
$(
osascript
-e
'application "Spotify" is running'
)
=
"false"
]
;
then
osascript
-e
'tell application "Spotify" to activate'
osascript
-e
'tell application "Spotify" to activate'
||
exit
1
sleep
2
fi
fi
...
...
@@ -160,7 +165,7 @@ while [ $# -gt 0 ]; do
showAPIHelp
;
exit
1
;
fi
SHPOTIFY_CREDENTIALS
=
$(
printf
"
${
CLIENT_ID
}
:
${
CLIENT_SECRET
}
"
|
base64
|
tr
-d
"
\n
"
)
;
SHPOTIFY_CREDENTIALS
=
$(
printf
"
${
CLIENT_ID
}
:
${
CLIENT_SECRET
}
"
|
base64
|
tr
-d
"
\n
"
|tr
-d
'\r'
)
;
SPOTIFY_PLAY_URI
=
""
;
getAccessToken
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment