๐ I created a tool for automatically authenticating mopidy-spotify with spotify.
๐ก Newskategorie: Linux Tipps
๐ Quelle: reddit.com
I use Spotify to listen to music. It's cheap, it's easy and it works everywhere.
I also wanted to use mopidy + mpc + iris, because I'm a nerd and I want to make my life hard. Also waybar integration. Mainly the first reason, though.
Anyway mopidy works great pretty much out of the box, no problem there. Mopidy-Spotify also seemed to work nicely right away, but then I tried to play some music after a restart. Mopidy was not authorized to actually play any music. I had to reauthenticate and update my mopidy.conf. Annoying to do this on every startup. Shouldn't be hard to write a script for this?
Five days later: https://github.com/JanneSalokoski/msah
I now have a script that starts a firefox window, controls it navigating over to Mopidy-Spotify-authentication page and proceeds with the authentication over on spotify. The script reads outputted client_id and client_secret, gets sudo access and updates mopidy.conf. It also waits exactly one (1) second before restarting mopidy. It just wouldn't work without...
I learned loads of new things while creating this script. Many I wouldn't have wanted to learn, but now I know. Lucky for you, you don't have to learn everything yourself, since I wanted to share this program with you. Or then I maybe just wanted to share my troubles with everyone.
Anyway here you have my final product. A tool for authenticating mopidy on spotify, so you save a few clicks if you go through the trouble of installing my tool.
[link] [comments] ...