This is a playback queue system that lets users of chalmers.it vote on which media from Spotify, YouTube and SoundCloud to play on a running client.
The system is built on three parts:
Responsible for handling the contact between the different parts. Maintains integrity of the voting and queue system.
E.g. tells the playback client that a new item is to be played.
- Copy
options_example.py
tooptions_local.py
or something similar (try to avoidoptions.py
since then it will be copied into the docker image when built) - Fill in required environment variables, api-keys etc.
- Build docker with:
docker build -t playit .
- Run image with:
docker run -it -v db:/db -v $(pwd)/options_local.py:/usr/src/app/options.py -p 8888:80 --rm --name playit-running playit
This runs the image with a logical volume db for storing sqlite db between restarts of docker-run and exposes port 8888 as the app port.
Responsible for showing the queue to the user as well as sending upvote and downvote information to the backend.
Retrieves information about the next item in the queue and plays the item.
pip3 install -r playbackClient/requirements.txt
pacman -S mopidy mpv youtubedl
sudo apt-get install mopidy mpv youtube-dl
Add this to your ~/.config/mopidy/mopidy.conf file. (create it if it doesn't exist)
[spotify]
username = *username*
password = *password*
[soundcloud]
auth_token = *token*
explore_songs = 25
sudo systemctl start mopidy
sudo service start mopidy
playbackClient/playbackClient.py -s hostname:8888