2017-06-24 18:12:54 +00:00
|
|
|
# Supysonic
|
2013-05-15 16:07:47 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
Supysonic is a Python implementation of the [Subsonic][] server API.
|
2013-05-15 16:07:47 +00:00
|
|
|
|
2020-11-22 14:17:05 +00:00
|
|
|
![Build Status](https://github.com/spl0k/supysonic/workflows/Tests/badge.svg)
|
2017-12-10 21:31:12 +00:00
|
|
|
[![codecov](https://codecov.io/gh/spl0k/supysonic/branch/master/graph/badge.svg)](https://codecov.io/gh/spl0k/supysonic)
|
2022-01-30 15:37:09 +00:00
|
|
|
![Python](https://img.shields.io/badge/python-3.6--3.10-blue.svg)
|
2017-12-10 21:31:12 +00:00
|
|
|
|
2013-06-14 17:36:14 +00:00
|
|
|
Current supported features are:
|
2013-10-14 16:36:45 +00:00
|
|
|
* browsing (by folders or tags)
|
|
|
|
* streaming of various audio file formats
|
2021-01-23 17:33:25 +00:00
|
|
|
* transcoding
|
2013-10-14 16:36:45 +00:00
|
|
|
* user or random playlists
|
2021-01-23 17:33:25 +00:00
|
|
|
* cover art
|
2013-06-14 17:36:14 +00:00
|
|
|
* starred tracks/albums and ratings
|
2021-11-20 20:01:00 +00:00
|
|
|
* [Last.fm][lastfm] scrobbling
|
2019-11-23 14:08:18 +00:00
|
|
|
* Jukebox mode
|
2013-05-15 16:07:47 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
Supysonic currently targets the version 1.10.2 of the Subsonic API. For more
|
2018-02-14 18:45:39 +00:00
|
|
|
details, go check the [API implementation status][docs-api].
|
2017-06-24 19:44:14 +00:00
|
|
|
|
|
|
|
[subsonic]: http://www.subsonic.org/
|
2021-01-23 17:33:25 +00:00
|
|
|
[lastfm]: https://www.last.fm/
|
|
|
|
[docs-api]: https://supysonic.readthedocs.io/en/latest/api.html
|
2013-06-12 21:14:27 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
## Documentation
|
2017-06-24 18:24:10 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
Full documentation is available at https://supysonic.readthedocs.io/
|
2018-08-11 13:52:50 +00:00
|
|
|
|
2017-06-24 20:23:28 +00:00
|
|
|
## Quickstart
|
2017-06-24 19:23:50 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
Use the following commands to install Supysonic, create an admin user, define a
|
2021-11-06 16:51:54 +00:00
|
|
|
library folder, scan it and start serving on port 5722 using [Gunicorn][].
|
2017-06-24 19:23:50 +00:00
|
|
|
|
2021-11-21 16:51:44 +00:00
|
|
|
$ pip install supysonic
|
2021-01-23 17:33:25 +00:00
|
|
|
$ pip install gunicorn
|
|
|
|
$ supysonic-cli user add MyUserName
|
|
|
|
$ supysonic-cli user setroles --admin MyUserName
|
2018-02-14 18:45:39 +00:00
|
|
|
$ supysonic-cli folder add MyLibrary /home/username/Music
|
2017-06-24 19:23:50 +00:00
|
|
|
$ supysonic-cli folder scan MyLibrary
|
2021-11-06 16:51:54 +00:00
|
|
|
$ supysonic-server
|
2013-05-15 16:07:47 +00:00
|
|
|
|
2017-06-24 20:23:28 +00:00
|
|
|
You should now be able to enjoy your music with the client of your choice!
|
2017-06-24 19:44:14 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
But using only the above commands will use a default configuration and
|
|
|
|
especially storing the database in a temporary directory. Head over to the
|
|
|
|
documentaiton for [full setup instructions][docs-setup], plus other options if
|
|
|
|
you don't want to use Gunicorn.
|
|
|
|
|
|
|
|
Note that there's also an optional [daemon][docs-daemon] that watches for
|
|
|
|
library changes and provides support for other features such as the
|
|
|
|
jukebox mode.
|
2018-02-14 18:45:39 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
[gunicorn]: https://gunicorn.org/
|
|
|
|
[docs-setup]: https://supysonic.readthedocs.io/en/latest/setup/index.html
|
|
|
|
[docs-daemon]: https://supysonic.readthedocs.io/en/latest/setup/daemon.html
|
2018-02-14 18:45:39 +00:00
|
|
|
|
2021-01-23 17:33:25 +00:00
|
|
|
## Development stuff
|
|
|
|
|
|
|
|
For those wishing to collaborate on the project, since Supysonic uses [Flask][]
|
|
|
|
you can use its development server which provides automatic reloading and
|
|
|
|
in-browser debugging among other things. To start said server:
|
|
|
|
|
|
|
|
$ export FLASK_APP="supysonic.web:create_application()"
|
|
|
|
$ export FLASK_ENV=development
|
|
|
|
$ flask run
|
|
|
|
|
2021-11-20 20:01:00 +00:00
|
|
|
And there's also the tests (which require `lxml` to run):
|
2021-01-23 17:33:25 +00:00
|
|
|
|
2021-11-20 20:01:00 +00:00
|
|
|
$ pip install lxml
|
|
|
|
$ python -m unittest
|
|
|
|
$ python -m unittest tests.net.suite
|
|
|
|
|
|
|
|
The last command runs a few tests that make HTTP requests to remote third-party
|
|
|
|
services (namely Last.fm and ChartLyrics).
|
2021-01-23 17:33:25 +00:00
|
|
|
|
2021-01-24 16:49:18 +00:00
|
|
|
[flask]: https://flask.palletsprojects.com/
|