Created
December 15, 2016 22:11
-
-
Save michaellunzer/939971417bf6dd5bfbaa0dced969a663 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is a simple bash script to load up a hard coded spotify url and play it | |
# make sure to make the file excutable (chmod 777 autostart_music.sh) | |
# to add it on boot, look here: https://www.raspberrypi.org/documentation/linux/usage/rc-local.md | |
# Made by LUNZCORP | |
mpc clear # this clears any loaded music | |
mpc random on | |
mpc repeat on | |
mpc volume 20 # Sets the volume to 20%, usually it is 85% -- this is to prevent ears & speakers getting blown out | |
mpc add spotify:user:1257169155:playlist:6v5GsliUA8B1KRWk3ODxeZ # add the spotify URL ... on the desktop right click the playlist in the spotify app -> copy playlist URL | |
mpc play # will play the music | |
mpc volume 40 # increases the volume | |
sleep 1 | |
mpc volume 85 | |
sleep 5 # not necessary | |
mpc status #shows you what is playing, volume, progress, etc. you can remove this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment