- taste package: each listening event has a value (complete +1, a play that counts +0.5, a skip that does not count -1, a short play 0), older events weigh less (half-life 90 days, taste.half_life_days), and the values of an artist become a preference in (-1, 1) with tanh. - Tag profile built from the artists I like: genres of my files plus the tags already stored from providers, each source scaled to its own best tag. - GET /me/taste shows the liked artists and the tags. It reads local data only and never asks a provider. - TasteRepo reads events, names and tags; tests on SQLite and PostgreSQL. - OpenAPI spec, contract test, README and example config updated. Closes #27
32 lines
1.2 KiB
TOML
32 lines
1.2 KiB
TOML
# Copy to sonda.toml and adjust. sonda.toml is git-ignored.
|
|
# Precedence: defaults < this file < environment variables
|
|
# (SONDA_ENV, SONDA_LISTEN, SONDA_DB_DRIVER, SONDA_DB_PATH, SONDA_DB_DSN,
|
|
# SONDA_JWT_SECRET).
|
|
|
|
[server]
|
|
listen = "127.0.0.1:8080" # localhost by default
|
|
|
|
# Libraries (name + directory) are managed through the API: POST /api/v1/libraries.
|
|
[library]
|
|
scan_workers = 4 # parallel tag readers during a scan
|
|
|
|
[database]
|
|
driver = "sqlite" # "sqlite" or "postgres"
|
|
path = "sonda.db" # sqlite only
|
|
dsn = "" # postgres only, e.g. "postgres://user:pass@localhost:5432/sonda?sslmode=disable"
|
|
|
|
[log]
|
|
env = "production" # "dev" or "production"
|
|
|
|
[auth]
|
|
jwt_secret = "" # required, 32+ chars: openssl rand -hex 32
|
|
access_ttl_minutes = 15 # lifetime of an access token
|
|
refresh_ttl_hours = 720 # lifetime of a refresh token (30 days)
|
|
|
|
[listening]
|
|
min_listen_seconds = 20 # a play counts as a listen after this long, or when it completes
|
|
|
|
[taste]
|
|
half_life_days = 90 # an old listen weighs half as much after this many days
|
|
|
|
# Last.fm and MusicBrainz are set up through the API, not here: PUT /api/v1/providers/{name}.
|