Login for certain variables to be updated with your own slot's information

Supysonic

Supysonic is a Python implementation of the Subsonic server API.

Install

  1. Connect to your slot through SSH

  2. Create a Python 3 virtualenv with the instructions found here or use an existing one.

  3. With your virtualenv activated, install Supysonic and its dependencies

    git clone https://github.com/spl0k/supysonic.git
    cd supysonic
    pip install .
    
  4. Add ~/supysonic/bin to your shell's PATH.

    echo "PATH=\$PATH:\$HOME/supysonic/bin" >> ~/.bashrc && source ~/.bashrc
    
  5. Create some required directories: mkdir -p ~/.config/supysonic ~/.config/supysonic/webcache

  6. Create the ~/.supysonic file with the following contents. You can use nano ~/.supysonic to edit the file.

    [base]
    database_uri = sqlite:////home/user/.config/supysonic/library.db
    
    [webapp]
    cache_dir = /home/user/.config/supysonic/webcache
    
    [transcoding]
    transcoder_mp3_mp3 = lame --quiet --mp3input -b %outrate %srcpath -
    transcoder = ffmpeg -i %srcpath -ab %outratek -v 0 -f %outfmt -
    decoder_mp3 = mpg123 --quiet -w - %srcpath
    decoder_ogg = oggdec -o %srcpath
    decoder_flac = flac -d -c -s %srcpath
    encoder_mp3 = lame --quiet -b %outrate - -
    encoder_ogg = oggenc2 -q -M %outrate -
    
    [daemon]
    socket = /home/user/.config/supysonic/socket
    run_watcher = yes
    wait_delay = 5
    log_file = /home/user/.config/supysonic/supysonic-daemon.log
    log_level = INFO
    
  7. Run supysonic-cli then run the following commands to configure supysonic for use. Make sure to replace password with the password you would like to use.

     user add user -p password -a
     folder add files /home/user/files
     exit
    
  8. Start supysonic's daemon and web interface. Port 47675 has been automatically generated for you, but you may use another 5 digit port between 10000 and 65535.

     screen -dmS supysonic-daemon ~/virtualenv3/bin/supysonic-daemon
     screen -dmS supysonic-uwsgi ~/virtualenv3/bin/uwsgi --http 0.0.0.0:47675 --wsgi-file ~/supysonic/cgi-bin/supysonic.wsgi
    
  9. Scan your library by browsing to http://server.whatbox.ca:47675/folder/scan

  10. (Optional) Add supysonic to cron

    The following lines can be added to your crontab to make sure supysonic launches automatically on a server restart:

    @reboot . /home/user/virtualenv/bin/activate && screen -S supysonic-daemon /home/user/virtualenv/bin/python /home/user/virtualenv/bin/supysonic-daemon
    @reboot . /home/user/virtualenv/bin/activate && screen -S supysonic-uwsgi /home/user/virtualenv/bin/python /home/user/virtualenv/bin/uwsgi --http 0.0.0.0:47675 --wsgi-file /home/user/supysonic/cgi-bin/supysonic.wsgi
    

Adding additional folders

  1. Connect to your seedbox through SSH

  2. Activate your virtualenv with the instructions found here.

  3. Run supysonic-cli to configure supysonic with extra folders:

    folder add files /home/user/files
    exit
    
  4. Rescan your library

    Visit http://server.whatbox.ca:47675/folder/scan to refresh your library.

Web Interface

You may use the web interface by going to http://server.whatbox.ca:47675/.