feat(16-03): WriteTrackTags pipeline with player safety, scan mutex, events, and app wiring
- TagWriter struct with WriteTrackTags entry point orchestrating full pipeline - PlayerStopper interface + playerAdapter for import-cycle-free player safety - PipelineLocker interface + pipelineMu on Library for scan/write mutual exclusion - TrackMetadataChanged event constant + auto-generated TypeScript events - TagWriter wired into app.go as Wails binding with SetContext in OnStartup - 5 pipeline integration tests: player safety, scan mutex, orphan cleanup, genre relink, full DB sync - Lint fixes: static error, else-if, wsl cuddle, golines
This commit is contained in:
@@ -259,8 +259,10 @@ func syncDatabase(
|
||||
// 6. Update FTS5 search index (within the transaction).
|
||||
// ------------------------------------------------------------------
|
||||
newTitle := newName
|
||||
|
||||
newArtist := params.changes[FieldArtist]
|
||||
artistStr := ""
|
||||
|
||||
if newArtist != nil {
|
||||
artistStr, _ = newArtist.(string)
|
||||
}
|
||||
@@ -277,13 +279,11 @@ func syncDatabase(
|
||||
newAlbum := ""
|
||||
if v, ok := params.changes[FieldAlbum].(string); ok {
|
||||
newAlbum = v
|
||||
} else {
|
||||
} else if len(params.oldRGLinks) > 0 {
|
||||
// Look up current album from release groups if unchanged.
|
||||
if len(params.oldRGLinks) > 0 {
|
||||
rg, rgErr := txq.GetReleaseGroup(ctx, params.oldRGLinks[0].ReleaseGroupID)
|
||||
if rgErr == nil {
|
||||
newAlbum = rg.Name
|
||||
}
|
||||
rg, rgErr := txq.GetReleaseGroup(ctx, params.oldRGLinks[0].ReleaseGroupID)
|
||||
if rgErr == nil {
|
||||
newAlbum = rg.Name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user