Skip to main content

No project description provided

Project description

musicbox-mpd

A lightweight web based MPD client.

Written in python and vanilla.js.

Features

  • Mobile friendly interface
  • Album centered design
  • Playback controls: Play, Pause, Stop, Next
  • Volume control
  • Album art display
  • Play queue
  • Saved playlist support
  • Search on Album, Artist, Songname and Year
  • Add any number of random songs to the queue
  • Intelligent handling of complilations with multiple artists
  • Easy to install with minimal dependencies (just 3 python libraries)

installing/running

Pre-installation Make sure you have installed and correctly configured MPD

The best way to install musicbox-mpd is va pipx. The instuctions below outline how to install and configure on a Debian based linux distribution. It's best to run musicbox-mpd on the same machine as your MPD server.

  1. Install pipx (if not already installed)

    sudo apt install pipx
    
  2. Install musicbox-mpd

    pipx install musicbox-mpd
    
  3. Check that is works

    musicbox-mpd
    

If you all OK you should see output similar to this:

0.23.5
Library cached
Bottle v0.12.25 server starting up (using WSGIRefServer())...
Listening on http://localhost:8080/
Hit Ctrl-C to quit.

You can now open a browser on any machine in your local network and enter the following address: http://[name of your MPD server]:8080/ui

Other OS's - Windows/MacOS

Musicbox is just a simple python script, so will work on any OS that supports python. I designed musicbox to run on a raspberrypi, so the installation process on windows is not as user friendly. For windows you will need to specify the name of the config file, as by default it looks in /etc which will not exist. Also running as a service in windows is beyond the scope of this document.

Install as a service

Example of installing as a service on a raspberry pi.

  1. Create the service file

    musicbox-mpd --service
    
  2. Move service file to systemd folder

    sudo mv musicbox-mpd.service /etc/systemd/system/musicbox-mpd.service
    
  3. Reload the daemon

    sudo systemctl daemon-reload
    
  4. Make sure service gets restarted on reboot

    sudo systemctl enable musicbox-mpd
    
  5. Start the service

    sudo systemctl start musicbox-mpd
    
  6. Check that it worked

    sudo systemctl status musicbox-mpd
    

Configuration

By default musicbox looks for the configuration file at /etc/musicbox-mpd.conf.json. This can be over-written by a command line option.

"host" - Ip address musicbox will listen to connections on "port" - the port musicbox will listen to connections on "mpd_host" - url of MPD server "mpd_port" - port of MPD server "image_folder" - this is the folder musicbox will use to cache album art "stations" - a list of internet radio stations

Adding internet radio

Example configuration file containing internet radio stations:

{
    "host" : "0.0.0.0",
    "port" : 8080,
    "mpd_host" : "localhost",
    "mpd_port" : 6600,
    "image_folder" : "/tmp/musicbox",
    "stations" : [
        {"name":"3RRR Melbourne", "url":"https://ondemand.rrr.org.au/stream/ws-hq.m3u"},
        {"name": "PBS 106.7FM", "url" : "https://playerservices.streamtheworld.com/api/livestream-redirect/3PBS_FMAAC128.m3u8"}
    ]
}

Command line options

-h, --help
show help message and exit

-v, --version
display the version number of musicbox

-c CONFIGFILE, --configfile CONFIGFILE
allows you to specify the name of the config file used. Otherwise will default to /etc/musicbox-mpd.conf.json

-s, --service
create a systemd service file in current directory

--create-config
create a default config file in current directory

User Guide

Commands

  • :clear - clear the current queue
  • :mix [name of mixtape] - save contents of current queue to a 'mixtape' (aka playlist)
  • :delmix [name of mixtape] - delete a mixtape
  • :rand [x] - add 'x' number of random songs to the queue
  • :update - recan music library
  • :settings - show MPD settings
  • :shuffle - shuffle songs in the current queue
  • :error - show the last error message (if any) from the MPD server
  • :about - display version of musicbox and MPD server

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

musicbox_mpd-0.2.0.tar.gz (226.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

musicbox_mpd-0.2.0-py3-none-any.whl (228.6 kB view details)

Uploaded Python 3

File details

Details for the file musicbox_mpd-0.2.0.tar.gz.

File metadata

  • Download URL: musicbox_mpd-0.2.0.tar.gz
  • Upload date:
  • Size: 226.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for musicbox_mpd-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e541b07fc21ab9e2ccb12fd628ceb68ae21e4e9c667a8a036e0e14fbecb6149c
MD5 2a6a829b91eaf8f97e2638d0e186c56d
BLAKE2b-256 3d42e3f6043026c0e91d3236abf62a799565f9d79cf287c04974e53d7e7fe779

See more details on using hashes here.

File details

Details for the file musicbox_mpd-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: musicbox_mpd-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 228.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for musicbox_mpd-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20f7866864f2b426aeb9f442f3468e6a441738782b9fe42689c3329bd532d56b
MD5 83e67dc40bc4b8c04b20eb7dd7e81f2f
BLAKE2b-256 ffa5a69320e27a9bd50500419e31d7276525d8915898848773609c8b77a51718

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page