feat(settings): my own settings, starting with Discover from my listening
- GET and PATCH /me/settings: settings that belong to the signed-in user. - First setting, discover_from_listening, is off by default. When on, Discover may start from the artists I listen to most, which sends their names to Last.fm. - New user_settings table (migration 0011, SQLite and PostgreSQL), removed with the account. A user with no row has the private defaults. - A misspelt setting is rejected instead of being ignored. - Spec, contract test and README updated. Refs #29
This commit is contained in:
parent
715a50eb5d
commit
e0592c0260
1 changed files with 514 additions and 4 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
"codeberg.org/squidd/sonda/internal/storage"
|
||||
"codeberg.org/squidd/sonda/internal/streaming"
|
||||
"codeberg.org/squidd/sonda/internal/taste"
|
||||
"codeberg.org/squidd/sonda/internal/usersettings"
|
||||
"codeberg.org/squidd/sonda/migrations"
|
||||
)
|
||||
|
||||
|
|
@ -150,6 +151,7 @@ func run() error {
|
|||
Discovery: discoveries,
|
||||
Tags: tags,
|
||||
Taste: taste.NewService(storage.NewTasteRepo(db), taste.Options{MinListen: cfg.Listening.MinListen(), HalfLife: cfg.Taste.HalfLife()}),
|
||||
Settings: usersettings.NewService(storage.NewUserSettingsRepo(db)),
|
||||
Streams: streaming.NewService(libraryRepo),
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue