1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-22 17:06:17 +00:00
supysonic/config.sample

85 lines
2.7 KiB
Plaintext
Raw Normal View History

2015-04-05 13:12:45 +00:00
[base]
2017-12-14 21:28:49 +00:00
; A database URI. See the 'schema' folder for schema creation scripts
2018-02-14 18:45:39 +00:00
; Default: sqlite:////tmp/supysonic/supysonic.db
2017-11-29 19:09:48 +00:00
;database_uri = sqlite:////var/supysonic/supysonic.db
;database_uri = mysql://supysonic:supysonic@localhost/supysonic
;database_uri = postgres://supysonic:supysonic@localhost/supysonic
2015-04-05 13:12:45 +00:00
2017-11-29 19:09:48 +00:00
; Optional, restrict scanner to these extensions. Default: none
;scanner_extensions = mp3 ogg
; Should the scanner follow symbolic links? Default: no
follow_symlinks = no
2015-04-05 14:17:47 +00:00
[webapp]
2017-11-29 19:09:48 +00:00
; Optional cache directory. Default: /tmp/supysonic
2015-04-05 13:12:45 +00:00
cache_dir = /var/supysonic/cache
Implement a cache manager for album art and transcodes Quick summary ------------- - Adds a Cache class (plus tests for it) that provides an API for managing a cache of files on disk - Adds two new settings to the configuration file: `cache_size` (default 512MB) and `transcode_cache_size` (default 1GB). - Creates two cache managers using the settings above: one for general stuff (currently album art) and one for transcodes - Adds the caching of transcoded files to disk for future use - Modifies the existing image caching to use the cache manager Longer explanations and justifications -------------------------------------- The reason I separated out transcodes into an entirely separate cache is that I could imagine a single transcode pushing out a ton of smaller images or other cached content. By separating them it should reduce the number of deletes caused by adding something to the cache. The cache manager allows for caching a value from a generator via passthrough. This means that a generator can be transparently wrapped to save its output in the cache. The bytes from the generator will be written to a temp file in the cache and yielded back. When it completes, the temp file will be renamed according to the provided cache key. This is how caching transcoded music is implemented. If multiple generators for the same key are started, they will all write to individual temp files until they complete and race to overwrite each other. Since the key should uniquely represent the content it indexes the files will be identical so overwriting them is harmless. The cache will store everything for a minimum amount of time (configurable, default is set at 5 minutes). After this time has elapsed, the data can be deleted to free up space. This minimum is so that when you cache a file to the disk you can expect it to be there after, even if another large file is added to the cache and requests that some files are deleted to make space. To ensure that a file will not be paged out of the cache regardless of the minimum time, there is a `protect` context manager that will refuse the delete the key from the cache as long as it's active. The cache has a maximum size, however this is more of a recommendation as opposed to a hard limit. The actual size will frequently exceed the limit temporarily until something can be paged out.
2019-01-14 06:46:21 +00:00
; Main cache max size in MB. Default: 512
cache_size = 512
; Transcode cache max size in MB. Default: 1024 (1GB)
transcode_cache_size = 1024
2017-11-29 19:09:48 +00:00
; Optional rotating log file. Default: none
2015-04-05 13:12:45 +00:00
log_file = /var/supysonic/supysonic.log
; Log level. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL.
; Default: WARNING
2015-04-05 14:17:47 +00:00
log_level = WARNING
; Enable the Subsonic REST API. You'll most likely want to keep this on, here
; for testing purposes. Default: on
2017-11-29 19:09:48 +00:00
;mount_api = on
; Enable the administrative web interface. Default: on
;mount_webui = on
2015-04-05 14:17:47 +00:00
[daemon]
2019-04-13 14:53:37 +00:00
; Socket file the daemon will listen on for incoming management commands
; Default: /tmp/supysonic/supysonic.sock
socket = /var/run/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
2019-11-23 14:08:18 +00:00
; Command used by the jukebox
jukebox_command = mplayer -ss %offset %path
; Optional rotating log file for the scanner daemon. Logs to stderr if empty
2015-04-05 14:17:47 +00:00
log_file = /var/supysonic/supysonic-daemon.log
log_level = INFO
2015-04-05 13:12:45 +00:00
[lastfm]
; API and secret key to enable scrobbling. http://www.last.fm/api/accounts
2017-11-29 19:09:48 +00:00
; Defaults: none
;api_key =
;secret =
2015-04-05 13:12:45 +00:00
[transcoding]
2017-11-29 19:09:48 +00:00
; 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 -
2015-04-05 13:12:45 +00:00
2019-10-26 14:26:51 +00:00
; Default format, used when a client requests a bitrate lower than the original
; file and no specific format
default_transcode_target = mp3
2015-04-05 13:12:45 +00:00
[mimetypes]
2017-11-29 19:09:48 +00:00
; Extension to mimetype mappings in case your system has some trouble guessing
; Default: none
;mp3 = audio/mpeg
;ogg = audio/vorbis
2015-04-05 13:12:45 +00:00