fix: address code review findings

- Preserve MBID and last_synced across periodic artist syncs (INSERT OR
  REPLACE was wiping them, forcing MusicBrainz re-resolution every cycle)
- Exclude unmonitored artists from unnotified-release digest query
- Require telegram.cron_schedule when telegram.enabled is true
- Add same-origin CSRF defense to state-changing web POST routes
- Skip WAL/busy_timeout pragmas for :memory: databases (no-op there)
- Scan mbid as sql.NullString in GetAllArtistSettings to tolerate NULLs
This commit is contained in:
2026-07-19 23:51:15 +03:00
parent 7cdb473d9c
commit ce1c39e14b
7 changed files with 90 additions and 18 deletions

View File

@@ -141,6 +141,9 @@ func validate(cfg *Config) error {
if cfg.Telegram.ChatID == "" {
return fmt.Errorf("telegram.chat_id is required when telegram.enabled is true")
}
if cfg.Telegram.CronSchedule == "" {
return fmt.Errorf("telegram.cron_schedule is required when telegram.enabled is true")
}
}
return nil
}