Skip to content

moodytux/mopidy-pi-client

Repository files navigation

Mopidy-Pi-Client

Latest PyPI version Travis CI build status Test coverage

Mopidy extension specifically for the Raspberry Pi Touchscreen. Developed and tested under Firefox running in fullscreen mode.

Screenshots

/screenshots/album-info-screen.png

/screenshots/album-list-screen.png

/screenshots/loading-screen.png

Installation

Make sure Mopidy is installed, and if you wish to use Spotify Premium then install mopidy-spotify too:

sudo apt-get install mopidy mopidy-spotify

Currently, this plugin in is development so you will need to clone this repo and run:

sudo pip install -e mopidy-pi-client

Eventually you will be able to install by running:

pip install Mopidy-Pi-Client

Configuration

Before starting Mopidy, you must add configuration for Mopidy-Pi-Client to your Mopidy configuration file:

[pi-client]
enabled = true

and to support Spotify Premium add:

[spotify]
enabled = true
bitrate = 320
username = <your_spotify_username>
password = <your_spotify_password>
client_id = <your_spotify_client_id>
client_secret = <your_spotify_secret>

Load a web browser up and go to: http://<configured_ip>:<configured_port>/pi-client/html/

Feature roadmap

  • Show track artist on a Various Artists album info screen
  • Look into possibility of removing cursor to be more touch friendly
  • Adding gesture support to the track list on the album info screen
  • Selecting albums by genre
  • Provide a refresh button for refreshing album list
  • Providing track duration and elapsed time information

Development

To develop on mopidy-pi-client, there is a ready made Vagrantfile and Ansible playbook to setup a working environment in VirtualBox:

  • Add some music to the vagrant/music sub-directory to test with

  • Get your environment up and running by typing in a terminal:

    cd <repo_path>/vagrant
    cp ansible/vars/secret.yml.sample ansible/vars/secret.yml
    vagrant up
    
  • See your environment in a browser by going to http://192.168.33.10:6680/pi-client/html/

  • Run the unit tests by typing in a terminal:

    cd <repo_path>/vagrant
    vagrant ssh
    sudo su - mopidy
    cd /mopidy-pi-client/test
    mocha *
    

Project resources

Credits

Changelog

v0.3.0

  • Added support for Spotify Premium, where for each artist the first album added is one from Spotify not in the local album collection.
  • Added a progress bar on the current track to indicate elapsed playing time.
  • Code refactoring to have unit tested playback state.
  • Updating Ansible scripts to provide latest NodeJS for use with tests.

v0.2.0

  • New category flow selector to allow scrolling to artists starting with a given letter. This is also linked to the cover flow selector so scrolling through covers changes the artist letter and similarly scrolling through letters scrolls to the first artists first cover. Written to be extensible for future category types such as genres.
  • Refactored all code to use requirejs, so everything is much more modular and maintainable.
  • Added a Vagrantfile to provide a working development environment, utilising Ansible for provisioning.
  • Added Mocha unit tests for most modules, runnable in the development environment.

v0.1.1

  • Bugfix to the album info back button state, it should always be enabled.

v0.1.0

  • Initial release.

About

Mopidy extension specifically for the Raspberry Pi Touchscreen

Resources

License

Stars

Watchers

Forks

Packages

No packages published