Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
e634730e
Unverified
Commit
e634730e
authored
Feb 05, 2019
by
genevera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update spotify to newest version
parent
851899e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
spotify
plugins/osx/spotify
+8
-3
No files found.
plugins/osx/spotify
View file @
e634730e
#!/usr/bin/env bash
#!/usr/bin/env bash
function
spotify
()
{
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
# Contains numerous helpful contributions from Jorge Colindres, Thomas
# Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin
# Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin
...
@@ -134,8 +134,13 @@ showStatus () {
...
@@ -134,8 +134,13 @@ showStatus () {
if
[
$#
=
0
]
;
then
if
[
$#
=
0
]
;
then
showHelp
;
showHelp
;
else
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
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
sleep
2
fi
fi
fi
fi
...
@@ -160,7 +165,7 @@ while [ $# -gt 0 ]; do
...
@@ -160,7 +165,7 @@ while [ $# -gt 0 ]; do
showAPIHelp
;
showAPIHelp
;
exit
1
;
exit
1
;
fi
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
=
""
;
SPOTIFY_PLAY_URI
=
""
;
getAccessToken
()
{
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