Skip to content

Instantly share code, notes, and snippets.

@Lucchetto
Last active June 19, 2020 06:50
Show Gist options
  • Save Lucchetto/7b875eec6c18a6e512157b85816c7f44 to your computer and use it in GitHub Desktop.
Save Lucchetto/7b875eec6c18a6e512157b85816c7f44 to your computer and use it in GitHub Desktop.

Revisions

  1. Lucchetto revised this gist Jun 19, 2020. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions apache-supysonic.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <VirtualHost *:5000>

    WSGIDaemonProcess supysonic home=/var/lib/supysonic user=supysonic group=supysonic
    WSGIProcessGroup supysonic
    WSGIApplicationGroup %{GLOBAL}
    ErrorLog /var/lib/supysonic/error_log

    WSGIScriptAlias / /var/www/supysonic/cgi-bin/supysonic.wsgi
    <Directory /var/www/supysonic/cgi-bin>
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    Require all granted
    </Directory>
    </VirtualHost>
  2. Lucchetto revised this gist Jun 19, 2020. 2 changed files with 14 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions supysonic-daemon.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    [Unit]
    Description=Supysonic Daemon
    ;After=mariadb.service
    ;After=postgresql.service

    [Service]
    User=supysonic
    Group=supysonic
    WorkingDirectory=/var/lib/supysonic
    ExecStart=/usr/bin/env python3 -m supysonic.daemon

    [Install]
    WantedBy=multi-user.target
    1 change: 1 addition & 0 deletions supysonic.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    u supysonic - "Supysonic" /var/lib/supysonic/
  3. Lucchetto created this gist Jun 19, 2020.
    84 changes: 84 additions & 0 deletions supysonic
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,84 @@
    [base]
    ; A database URI. See the 'schema' folder for schema creation scripts
    ; Default: sqlite:////tmp/supysonic/supysonic.db
    ;database_uri = sqlite:////var/supysonic/supysonic.db
    database_uri = mysql://lucchetto:macosx10.10@localhost/supysonic
    ;database_uri = postgres://supysonic:supysonic@localhost/supysonic

    ; Optional, restrict scanner to these extensions. Default: none
    ;scanner_extensions = mp3 ogg

    ; Should the scanner follow symbolic links? Default: no
    follow_symlinks = no

    [webapp]
    ; Optional cache directory. Default: /tmp/supysonic
    cache_dir = /var/lib/supysonic/cache

    ; Main cache max size in MB. Default: 512
    cache_size = 512

    ; Transcode cache max size in MB. Default: 1024 (1GB)
    transcode_cache_size = 1024

    ; Optional rotating log file. Default: none
    log_file = /var/lib/supysonic/supysonic.log

    ; Log level. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL.
    ; Default: WARNING
    log_level = WARNING

    ; Enable the Subsonic REST API. You'll most likely want to keep this on, here
    ; for testing purposes. Default: on
    ;mount_api = on

    ; Enable the administrative web interface. Default: on
    ;mount_webui = on

    [daemon]
    ; Socket file the daemon will listen on for incoming management commands
    ; Default: /tmp/supysonic/supysonic.sock
    socket = /var/lib/supysonic/supysonic.sock

    ; Defines if the file watcher should be started. Default: yes
    run_watcher = yes

    ; Delay in seconds before triggering scanning operation after a change have been
    ; detected.
    ; This prevents running too many scans when multiple changes are detected for a
    ; single file over a short time span. Default: 5
    wait_delay = 5

    ; Command used by the jukebox
    jukebox_command = mplayer -ss %offset %path

    ; Optional rotating log file for the scanner daemon. Logs to stderr if empty
    log_file = /var/lib/supysonic/supysonic-daemon.log
    log_level = INFO

    [lastfm]
    ; API and secret key to enable scrobbling. http://www.last.fm/api/accounts
    ; Defaults: none
    ;api_key =
    ;secret =

    [transcoding]
    ; Programs used to convert from one format/bitrate to another. Defaults: none
    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 -

    ; Default format, used when a client requests a bitrate lower than the original
    ; file and no specific format
    default_transcode_target = mp3

    [mimetypes]
    ; Extension to mimetype mappings in case your system has some trouble guessing
    ; Default: none
    ;mp3 = audio/mpeg
    ;ogg = audio/vorbis