1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-09-19 19:01:03 +00:00
Go to file
Carey Metcalfe 109f81e713 Fix bitrate units when scanning
In `0183bcb6` the scanner switched from using Mutagen to Mediafile for
scanning files. Prior to this commit, the bitrate from Mutagen was
divided by 1000 to convert it from bps to kbps. After switching to
Mediafile, the conversion was dropped even though Mediafile also reports
bitrate in bps.

This commit adds back the conversion to kbps and adds a test that checks
that the bitrate and some other metadata is correct.

This commit will fix transcoding being applied in some cases where it
isn't needed. This was happening because the bitrate in the DB was
always larger than the requested bitrate due to its units.
2023-03-31 16:23:11 -04:00
.github/workflows Drop Python 3.6 2023-01-01 14:00:20 +01:00
docs Docs: add a note about supysonic-server tuning 2023-03-25 15:59:52 +01:00
supysonic Fix bitrate units when scanning 2023-03-31 16:23:11 -04:00
tests Fix bitrate units when scanning 2023-03-31 16:23:11 -04:00
.coveragerc Updates for Travis and codecov 2017-12-10 22:31:12 +01:00
.gitignore add .vscode to gitignore 2020-11-28 12:13:23 +01:00
ci-requirements.txt Tweaking test workflow 2020-11-22 15:17:05 +01:00
codecov.yml CI tweaks 2021-12-04 15:51:54 +01:00
config.sample Setting to enable or disable ChartLyrics 2023-03-18 16:04:00 +01:00
LICENSE Setting a license 2014-03-02 18:31:32 +01:00
MANIFEST.in Remove old stuff 2021-11-12 11:31:03 +01:00
pyproject.toml Build and include man pages in distributions 2021-12-31 18:05:43 +01:00
README.md Forgot to update badge and docs about Python version 2023-01-08 16:40:51 +01:00
setup.cfg Drop Python 3.6 2023-01-01 14:00:20 +01:00
setup.py Build and include man pages in distributions 2021-12-31 18:05:43 +01:00

Supysonic

Supysonic is a Python implementation of the Subsonic server API.

Build Status codecov Python

Current supported features are:

  • browsing (by folders or tags)
  • streaming of various audio file formats
  • transcoding
  • user or random playlists
  • cover art
  • starred tracks/albums and ratings
  • Last.fm scrobbling
  • Jukebox mode

Supysonic currently targets the version 1.12.0 of the Subsonic API. For more details, go check the API implementation status.

Documentation

Full documentation is available at https://supysonic.readthedocs.io/

Quickstart

Use the following commands to install Supysonic, create an admin user, define a library folder, scan it and start serving on port 5722 using Gunicorn.

$ pip install supysonic
$ pip install gunicorn
$ supysonic-cli user add MyUserName
$ supysonic-cli user setroles --admin MyUserName
$ supysonic-cli folder add MyLibrary /home/username/Music
$ supysonic-cli folder scan MyLibrary
$ supysonic-server

You should now be able to enjoy your music with the client of your choice!

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, plus other options if you don't want to use Gunicorn.

Note that there's also an optional daemon that watches for library changes and provides support for other features such as the jukebox mode.

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

And there's also the tests (which require lxml to run):

$ 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).