All Projects → redshodan → Unsonic

redshodan / Unsonic

Licence: other
Unsonic, the un-Subsonic music server.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Unsonic

Nicemusic
A Nice MusicPlayer Powered by StarrySky
Stars: ✭ 107 (+435%)
Mutual labels:  music, music-library
I dropped my phone the screen cracked
web audio, cracked.
Stars: ✭ 245 (+1125%)
Mutual labels:  music, music-library
Edsp
A cross-platform DSP library written in C++ 11/14. This library harnesses the power of C++ templates to implement a complete set of DSP algorithms.
Stars: ✭ 116 (+480%)
Mutual labels:  music, music-library
Musicott
JavaFX application that manages and plays music files.
Stars: ✭ 97 (+385%)
Mutual labels:  music, music-library
Tauonmusicbox
The Linux desktop music player from the future! 🌆
Stars: ✭ 494 (+2370%)
Mutual labels:  music, music-library
Cracked
Mac app for noise making - built w/ "I Dropped My Phone The Screen Cracked"
Stars: ✭ 98 (+390%)
Mutual labels:  music, music-library
Maloja
Self-hosted music scrobble database to create personal listening statistics and charts
Stars: ✭ 223 (+1015%)
Mutual labels:  music, music-library
Beets
music library manager and MusicBrainz tagger
Stars: ✭ 10,522 (+52510%)
Mutual labels:  music, music-library
Hyperamp
🎛 Humble music player
Stars: ✭ 293 (+1365%)
Mutual labels:  music, music-library
Simple Netease Cloud Music
🎵A simple netease music api lib. 简单、统一、轻巧的 Node.js 版网易云音乐 API
Stars: ✭ 268 (+1240%)
Mutual labels:  music, music-library
Guayadeque
Guayadeque is a music management program designed for all music enthusiasts. It is Full Featured Linux media player that can easily manage large collections and uses the Gstreamer media framework.
Stars: ✭ 87 (+335%)
Mutual labels:  music, music-library
Jetpack Musicplayer
即使不用云音乐听曲儿,也请务必收藏好该库!🔥 一行代码即可接入,音乐播放控制组件 - Even if you don't listen to the music by Spotify, be sure to collect this library, please! 🔥 This music player component can be accessed by only one line of code. Supporting by LiveData & AndroidX.
Stars: ✭ 577 (+2785%)
Mutual labels:  music, music-library
Starrysky
🔥A Powerful and Streamline MusicLibrary(一个丰富的音乐播放封装库,支持多种音频格式,完美解决你的问题。)
Stars: ✭ 1,022 (+5010%)
Mutual labels:  music, music-library
Webmidikit
Simplest MIDI Swift library
Stars: ✭ 100 (+400%)
Mutual labels:  music, music-library
Spotitube
Synchronize your Spotify collections downloading from external providers
Stars: ✭ 250 (+1150%)
Mutual labels:  music, music-library
Diffuse
A music player that connects to your cloud/distributed storage.
Stars: ✭ 517 (+2485%)
Mutual labels:  music, music-library
Quodlibet
Music player and music library manager for Linux, Windows, and macOS
Stars: ✭ 918 (+4490%)
Mutual labels:  music, music-library
Jssynth
Make music in your browser with this synthesizer and sequencer
Stars: ✭ 25 (+25%)
Mutual labels:  music
Arch Plex
Docker build script for Arch Linux base with Plex Media Server
Stars: ✭ 10 (-50%)
Mutual labels:  music
Randompicker
一个动态权重的随机算法
Stars: ✭ 24 (+20%)
Mutual labels:  music

Unsonic, the un-Subsonic music server.

Status

PyPi Latest Version Project Status License Supported Python Versions

Builds Build Status Coverage Status Updates

About

Unsonic is a free drop in replacement for the Subsonic music server. It follows the Subsonic API and is usable with existing Subsonic clients without requiring any adjustment to them.

Unsonic strives to be better at handling music files tags, playing of those songs and use less system resources.

Supported Clients

These are the clients that are known to work well:

  • DSub (Android)
  • JamStash (web)

These clients sort of work with isues:

  • Clementine (Linux desktop)

Installation

Unsonic requires Python 3.6 or greater to work.

Install Unsonic as a system service via pip

  • pip3 install unsonic
  • sudo unsonic install
  • <Edit /etc/unsonic.ini and update database and music libraries>
  • su unsonic -c 'unsonic sync'
  • su unsonic -c 'unsonic adduser '
  • systemctl start unsonic

Running Unsonic from source

  • make build
  • make run

Installing a Web Client

[unsonic]
ui = ../Jamstash/dist
  • With Unsonic running, point your browser at the url printed out, normally something like http://localhost:6543 and your will be redirected to the load Jamstash.
  • Jamstash is very picky about the server URL in it's configuration. Make sure there is no trailing '/' character otherwise Jamstash will not be able to build the path correctly.

Docker Installation

Docker files are located in the ./docker directory. The Makefile contains some convenience targets but the specific docker and/or docker-compose cmmands are also shown.

To build the Unsonic Docker image:

$ docker build ./docker

Or using docker-compose:

$ docker-compose -f ./docker/docker-compose.yml build

The docker-compose file defines 3 containers, each is geared toward a development/test setup; a production Docker should only use these as a reference. The containers defined are of PostgreSQL, and an Unsonic serve based on PostgreSQL and SQLite. The Unsonic containers requires a music directory to volume mount so one must be specified.

$ MUSIC_DIR=~/music/ docker-compose -f ./docker/docker-compose.yml create
$ MUSIC_DIR=~/music/ docker-compose -f ./docker/docker-compose.yml up Unsonic-postgres

Or using the Makefile to simplify all of the above.

$ make MUSIC_DIR=~/music/ docker-sqlite

See docker/Dockerfile for details about the unsonic image. The container details are defined docker/docker-compose.yml. The files docker/config.ini and docker/unsonic-init can be used to tweak the Unsonic process itself.

Adjusting the configuration

The main configuration settings are the location of the database

[mishmash]
sqlalchemy.url = sqlite:///%(here)s/build/development.sqlite

and the location of the music libraries

[library:Music]
paths = ~/music
sync = true

[library:More Music]
paths = /data/music
sync = true

Adjust them to fit your deployment needs. The mishmash.paths can have multiple music directories, one per line. %(here)s refers to the location of the configuration file itself.

Setting up LastFM

Unsonic includes support for querying LastFM for artist/album information out of the box. In addition, you can configure Unsonic with your LastFM account to enable scrobbling.

$ unsonic config -s "lastfm.user=lastfm-user" unsonic-user
$ unsonic config -s "lastfm.password=lastfm-password" unsonic-user

Running with TLS

Unsonic itself doesn't handle TLS, but can easily be run behind a reverse proxy that does. The following example shows how to configure nginx to reverse proxy to a local Unsonic instance. Replace example.com with your domain name/IP. You may change the path portion of the url from "unsonic" to whatever you wish, or remove it completely.

This would go into your /etc/nginx/nginx.conf or its own file in /etc/nginx/sites-available depending on how your distro is setup.

server {
    listen       80;
    server_name  example.com;
    return 301 https://$host$request_uri;
}

server {
    listen       443 ssl http2;
    server_name  example.com;

    ssl config...

    # Your Unsonic is located on https://example.com/
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffers 16 4k;
        proxy_buffer_size 2k;
        proxy_pass http://localhost:6543;
        proxy_read_timeout 90;
    }

Developing Unsonic

Running tests requires docker.

Development build

  • make devel
  • make devel-run

Tests

  • make tests

Running

  • ./bin/unsonic -c <config.ini> sync
  • ./bin/unsonic -c <config.ini> adduser name pass
  • ./bin/unsonic -c <config.ini> serve [--reload]

Manual Testing

  • ./test/bin/tester getArtists

New DB Version

  • ... Edit schema classes
  • make devel-clean
  • make devel-db
  • ./venv/bin/alembic -c unsonic/alembic/alembic.ini revision --autogenerate -m "comment"
  • ... DB schema should still be the older version
  • bin/unsonic -c unsonic/etc/development.ini listusers
  • ... Check DB schema matches new revision
  • ... Check in new revision file

License

Unsonic is licensed under the GPL v2 license. See the COPYING file for details or http://www.gnu.org/licenses/gpl-2.0.html#SEC1

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].