Consolidates in-progress work across autotag, explore, and library: - autotag: beets/Picard-informed scoring engine — ID-first matching, VA handling, recommendation tiers, and a merged distance/rank cascade, with an eval harness for regression tracking. - explore: offline MusicBrainz dump import/incremental refresh replaces the legacy tier crawl; index-first local search with fuzzy matching and a dedicated ranker; disk-free guards for dump downloads. - library: artist-credit extraction and matching. - lyrics: owned-library lyric search (FTS) with LRCLIB backfill. Also: rewrite README to be user-focused, and migrate upstream to git.ljones.me/yonlu/yellowjacket. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package config
|
|
|
|
const (
|
|
// DefaultWidth is the default window width in pixels for a fresh
|
|
// config. Kept comfortably above the minimum so a first launch
|
|
// (or a config with no saved size) opens at a usable size rather
|
|
// than the cramped minimum.
|
|
DefaultWidth = 1100
|
|
// DefaultHeight is the default window height in pixels for a fresh config.
|
|
DefaultHeight = 720
|
|
|
|
// MinWidth is the smallest allowed window width in pixels. Wails
|
|
// enforces this at runtime; it is also the floor below which a
|
|
// reported size is treated as bogus and not persisted.
|
|
MinWidth = 512
|
|
// MinHeight is the smallest allowed window height in pixels.
|
|
MinHeight = 384
|
|
)
|
|
|
|
// WindowConfig holds window size preferences.
|
|
type WindowConfig struct {
|
|
Width int `toml:"Width"`
|
|
Height int `toml:"Height"`
|
|
}
|
|
|
|
// NewDefaultWindowConfig returns a WindowConfig with sensible defaults.
|
|
func NewDefaultWindowConfig() *WindowConfig {
|
|
return &WindowConfig{
|
|
Width: DefaultWidth,
|
|
Height: DefaultHeight,
|
|
}
|
|
}
|
|
|
|
// applyDefaults fills in zero-value fields with defaults.
|
|
func (w *WindowConfig) applyDefaults() {
|
|
if w.Width <= 0 {
|
|
w.Width = DefaultWidth
|
|
}
|
|
|
|
if w.Height <= 0 {
|
|
w.Height = DefaultHeight
|
|
}
|
|
}
|