Open tatoosh opened 6 years ago
I don't think librespot is the place for this. You might have a look at spotipy (https://github.com/plamere/spotipy) to create a python scrip to control the volume..
Just to add for reference spotcontrol.
@thekr1s thx for the link, but i can't find volume control for spotipy @ComlOnline: great, but it's not python just 'go' - any other suggestions?
@thekr1s got it working :)
python volume.py 80 -> sets volume to 80%
here my working python code_
import pprint
import sys
import spotipy
import spotipy.util as util
scope = 'user-modify-playback-state'
username = 'YOURUSER'
token = util.prompt_for_user_token(username,scope,client_id='mine!',client_secret='mine!',redirect_uri='http://localhost:8888/callback/')
volume = int(sys.argv[1])
if token:
sp = spotipy.Spotify(auth=token)
sp.trace = False
results = sp.volume(volume)
print results
else:
print "Can't get token for", username
@tatoosh, Great that you got it working.
Is there a solution to control music Volumen by command line ?