Your personnal, self-hosted, online music player. Live demo !
As Festival implements a piece of subsonic api, it allows subsonic client apps to connect, like DSub !
Clone the project
git clone https://github.com/magne4000/festival.gitFestival needs Python 3.4 or greater in order to run.
pip3 install -r requirements.txtInstall Flask, SQLAlchemy and other python3 dependencies
sudo apt-get install python3-flask python3-sqlalchemy python3-pil python3-urllib3 python3-mutagenIf you want to use MySQL instead of SQLite, you can also install python3-mysql.connector, and configure SQLALCHEMY_DATABASE_URI in settings.cfg file.
git pull
python3 festival.py --checkYou can configure the app automatically on first launch:
python3 festival.py --checkIt'll create the settings.cfg file and prompt for mandatory values.
Otherwise, you can manually create a custom settings.cfg file:
cp settings.sample.cfg settings.cfgIn the newly created file settings.cfg, it is necessary to update the value of SCANNER_PATH:
SCANNER_PATH = '</path/to/your/musics/>'It is also recommended to check all other parameters.
If SCANNER_FOLDER_PATTERNS is activated in configuration (it is the default behavior), it is recommended to test the patterns with the following command:
python3 festival.py --test-regexYou can launch Festival in standalone mode. Just launch the following command to do so:
python3 festival.py --with-scannerNow, the webserver is running (by default on port 5000), and the scanner also runs in background.
In order to run behind a web server, Festival needs to be launched through uWSGI
sudo apt-get install uwsgi uwsgi-plugin-python3To start uwsgi process manually
cd /path/to/festival
uwsgi --ini festival.uwsgiIn order to start it automatically, refer to startup scripts
Install mod-proxy-uwsgi:
sudo apt-get install libapache2-mod-proxy-uwsgiThen, add this into one Apache VirtualHost
ProxyPass /festival uwsgi://127.0.0.1:15500/Add those line into one of your server { ... } block
rewrite ^[/]festival$ /festival/ permanent;
location /festival {
rewrite /festival/(.*) /$1 break;
include uwsgi_params;
uwsgi_param SCRIPT_NAME /festival;
uwsgi_modifier1 30;
uwsgi_pass 127.0.0.1:15500;
}sudo cp scripts/festival.upstart.conf /etc/init/festival.confThen edit /etc/init/festival.conf and replace values between {}.
sudo cp scripts/festival.systemd.conf /etc/systemd/system/festival.serviceThen edit /etc/systemd/system/festival.service and replace values between {}.
Subsonic client apps can be plugged to Festival. You just need to add it like any other server to your app. As it doesn't support login, if your app requires login/password, just fill credentials with random letters.
pip3 install xmlunittestMIT License
Copyright © 2014-2016 Joël Charles
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
