Closed feirsom closed 6 years ago
#!/bin/sh
SCONSIFY_PASSWORD=<password> ~/bin/sconsify
And another
#!/bin/sh
SCONSIFY_PASSWORD=<password> ~/bin/sconsify \
-ui=false \
-noui-silent=true \
-playlists=Beatles
Where it says <password>
, it has got my plain text password. Of course, the files are protected so that only my user can read/execute them. But then when executing, your password will be exposed in the file /proc/<pid>/environ
.
Sconsify won't ask the password as SCONSIFY_PASSWORD
is present.
The first one I call _sconsify
, the second one I call _sconsify_no_ui
.
Just to remember, the access token is necessary only for loading the playlists and when searching. So if you load sconsify in the morning, and don't search anything, you can use for the whole day, just don't exit sconsify.
-playlists=Beatles
is supposed to do. Unfortunately just realised that is not working. Probably when moving the the web-api, we forgot to implement that filter. I'll try to fix that.Thanks! Regarding the Tokens, this thread seems to say there is a workaround... no? https://github.com/p2/OAuth2/commit/3f8b24bfd0bf3237f0f46e12fb0980d04f08c6e5
I'm also looking at the Spotify Developer site: https://developer.spotify.com/web-api/authorization-guide/
see: 7. Requesting access token from refresh token
I'm curious if retrieving a new token could be automated in the script?
This also seems promising: https://www.npmjs.com/package/passport-spotify
Please advise
Playlist filter is working in the latest release.
No easy solution for saving the password or token expiration. Closing.
3 questions:
How do I save my password in the script, so i don't have to re-enter it? (currently, I have to enter it every time)
How do I create an Access Token that won't ever expire?
How do I load only 1 specified playlist in No UI mode, so that it won't eventually shuffle to other playlists in my library? How do I script it, so that it only plays and repeats the one specified playlist without deleting the other playlists from my library?
Current Code: ./sconsify -ui=false -username=username SCONSIFY_PASSWORD=password -noui-repeat-on=true -playlists="SPOTIFY URI" -noui-shuffle=false
Your help is very much appreciated! Thanks for the rad app!