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>
112 lines
3.8 KiB
Go
112 lines
3.8 KiB
Go
// Package events contains centralized event name constants for
|
|
// Wails frontend/backend communication. These names must match
|
|
// the corresponding event names in the TypeScript frontend.
|
|
package events
|
|
|
|
//go:generate go run ./cmd/genevents -source events.go -output ../../frontend/src/events.ts
|
|
|
|
// Playback events (backend → frontend push).
|
|
const (
|
|
PlaybackStateChanged = "PlaybackStateChanged"
|
|
PlaybackFinished = "PlaybackFinished"
|
|
TrackChanged = "TrackChanged"
|
|
SeekFailed = "SeekFailed"
|
|
VolumeChanged = "VolumeChanged"
|
|
)
|
|
|
|
// Queue events (backend → frontend push).
|
|
const (
|
|
QueueChanged = "QueueChanged"
|
|
QueueIndexChanged = "QueueIndexChanged"
|
|
QueueModeChanged = "QueueModeChanged"
|
|
QueueTracksModified = "QueueTracksModified"
|
|
)
|
|
|
|
// Config events.
|
|
const (
|
|
LibraryConfigChanged = "LibraryConfigChanged"
|
|
ThemeConfigChanged = "ThemeConfigChanged"
|
|
TrackListConfigChanged = "TrackListConfigChanged"
|
|
FavoritesConfigChanged = "FavoritesConfigChanged"
|
|
ShortcutsConfigChanged = "ShortcutsConfigChanged"
|
|
)
|
|
|
|
// Playlist events.
|
|
const (
|
|
PlaylistCreated = "PlaylistCreated"
|
|
PlaylistDeleted = "PlaylistDeleted"
|
|
PlaylistRenamed = "PlaylistRenamed"
|
|
PlaylistTracksChanged = "PlaylistTracksChanged"
|
|
PlaylistsRestored = "PlaylistsRestored"
|
|
DefaultPlaylistChanged = "DefaultPlaylistChanged"
|
|
)
|
|
|
|
// Library events.
|
|
const (
|
|
LibraryScanStarted = "LibraryScanStarted"
|
|
LibraryScanProgress = "LibraryScanProgress"
|
|
LibraryScanComplete = "LibraryScanComplete"
|
|
)
|
|
|
|
// Scan control events.
|
|
const (
|
|
LibraryScanCancelled = "LibraryScanCancelled"
|
|
LibraryScanPaused = "LibraryScanPaused"
|
|
LibraryScanResumed = "LibraryScanResumed"
|
|
)
|
|
|
|
// Scan queue events.
|
|
const (
|
|
LibraryScanQueued = "LibraryScanQueued"
|
|
LibraryScanQueueDrained = "LibraryScanQueueDrained"
|
|
)
|
|
|
|
// Library CRUD events.
|
|
const (
|
|
LibraryAdded = "LibraryAdded"
|
|
LibraryRenamed = "LibraryRenamed"
|
|
LibraryRemoved = "LibraryRemoved"
|
|
)
|
|
|
|
// Tag writing events.
|
|
const (
|
|
TrackMetadataChanged = "TrackMetadataChanged"
|
|
BatchWriteProgress = "BatchWriteProgress"
|
|
)
|
|
|
|
// Autotag apply events — emitted while an async ApplyAsync job is in flight so the review UI can render per-folder progress.
|
|
const (
|
|
AutotagApplyStarted = "AutotagApplyStarted" // {groupKey: string, total: int}
|
|
AutotagApplyProgress = "AutotagApplyProgress" // {groupKey, current, total, succeeded, failed}
|
|
AutotagApplyFinished = "AutotagApplyFinished" // {groupKey, succeeded, failed, error}
|
|
)
|
|
|
|
// Autotag prefetch events — emitted by the background worker that scores pending tagging items so sidebar pills populate without the user having to open each folder.
|
|
const (
|
|
AutotagPrefetchProgress = "AutotagPrefetchProgress" // {processed, total} — debounce on frontend
|
|
AutotagPrefetchFinished = "AutotagPrefetchFinished" // {processed, total}
|
|
)
|
|
|
|
// Explore / search index events.
|
|
const (
|
|
IndexStatusChanged = "IndexStatusChanged"
|
|
|
|
// ArtistDiscographyReady fires (payload: artist MBID string) after a
|
|
// lazy background discography fetch persists into the index, so the
|
|
// artist detail page can re-fetch its top tracks / top releases
|
|
// without the initial request having blocked on a live fetch.
|
|
ArtistDiscographyReady = "ArtistDiscographyReady"
|
|
|
|
// ArtistSimilarReady fires (payload: artist MBID string) after a lazy
|
|
// background similar-artists fetch persists into similar_artist_map,
|
|
// so the artist detail page can re-fetch that section without the
|
|
// initial request having blocked on a live LB labs call.
|
|
ArtistSimilarReady = "ArtistSimilarReady"
|
|
|
|
// AlbumReleasesReady fires (payload: release-group MBID string) after a
|
|
// lazy background BrowseReleases fetch populates the response cache, so
|
|
// the album detail page can re-fetch its versions / tracklist without
|
|
// the initial request having blocked on a live MusicBrainz browse.
|
|
AlbumReleasesReady = "AlbumReleasesReady"
|
|
)
|