performance updates now qwith progress on import

This commit is contained in:
Mark Gregory
2026-11-06 09:30:42 +00:00
parent 48d8ffe804
commit e331b0e5b2
4 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -648,7 +648,7 @@ struct StudioSettingsDialog: View {
VStack(spacing:0) {
HStack {
Text(category).font(.headline).frame(maxWidth:.infinity,alignment:.leading)
Picker("Settings for",selection:$scope) { Text("Karaoke").tag("Karaoke");Text("DJ").tag("DJ") }.pickerStyle(.segmented).frame(width:220)
Picker("Settings for",selection:$scope) { Text("Karaoke Studio").tag("Karaoke");Text("DJ Studio").tag("DJ") }.pickerStyle(.segmented).frame(width:280)
}.padding(.horizontal,24).padding(.top,18).padding(.bottom,10)
HStack(spacing:8) {
ForEach(categories,id:\.self) { name in
+6 -5
View File
@@ -499,6 +499,7 @@ struct SongDragReference: Codable, Sendable {
self.importToken = nil;self.importTask = nil;self.isImporting = false
self.perform { try self.refresh() }
self.importProgress = result
if let failure = result.failure { self.error = failure }
}
}
}
@@ -880,7 +881,7 @@ struct LibraryView: View {
}
private var workspaceLayout: some View {
TabView(selection:$workspaceTab) {
libraryWorkspace.tabItem { Label("Karaoke",systemImage:"music.mic") }.tag("Karaoke")
libraryWorkspace.tabItem { Label("Karaoke Studio",systemImage:"music.mic") }.tag("Karaoke")
DJConsole(system:model.dj)
.tabItem { Label("DJ Studio",systemImage:"opticaldisc") }.tag("DJ Studio")
}.accessibilityIdentifier("workspace.tabs")
@@ -918,8 +919,8 @@ struct LibraryView: View {
}
var body: some View {
workspace
.disabled(model.importProgress != nil || model.storageProgress != nil)
.overlay { if model.storageProgress != nil { ImportProgressDialog(model:model,storageMode:true) } else if model.importProgress != nil { ImportProgressDialog(model:model) } }
.disabled(model.storageProgress != nil)
.overlay { if model.storageProgress != nil { ImportProgressDialog(model:model,storageMode:true) } }
.onAppear { updateLibraryRows() }
.onChange(of:model.songs) { _ in updateLibraryRows() }
.onChange(of:model.tuningCache) { _ in updateLibraryRows() }
@@ -1691,8 +1692,8 @@ private struct SingerSongsSheet: View {
}.frame(height:270)
HStack { Button("Import Songs…") { importing = true };Button("SMB/NAS…") { importingServer = true };Spacer();Button("Done") { dismiss() }.keyboardShortcut(.defaultAction) }
}.padding(24).frame(width:520).background(StudioTheme.frame)
.disabled(model.importProgress != nil || model.storageProgress != nil)
.overlay { if model.storageProgress != nil { ImportProgressDialog(model:model,storageMode:true) } else if model.importProgress != nil { ImportProgressDialog(model:model) } }
.disabled(model.storageProgress != nil)
.overlay { if model.storageProgress != nil { ImportProgressDialog(model:model,storageMode:true) } }
.sheet(isPresented:$importingServer,onDismiss:{
let urls = serverImportURLs;serverImportURLs = []
model.importFiles(urls)
+1 -1
View File
@@ -167,6 +167,6 @@ Key and Tempo controls beside the main transport adjust the loaded performance i
## DJ Studio
The main window provides Karaoke and DJ Studio tabs; both retain playback while switching. DJ Studio has its own library, saved queue, Automix, MIDI profiles and saved multichannel audio routing. See [DJ workstation notes](docs/DJ_WORKSTATION.md) for supported controls, XML profile compatibility and hardware verification.
The main window provides Karaoke Studio and DJ Studio tabs; both retain playback while switching. DJ Studio has its own library, saved queue, Automix, MIDI profiles and saved multichannel audio routing. See [DJ workstation notes](docs/DJ_WORKSTATION.md) for supported controls, XML profile compatibility and hardware verification.
Library row menus include Song Settings and Waveforms generation/regeneration in karaoke, and Load into Deck A/B in DJ Studio. The bottom Waveforms button and karaoke header Song Settings button have been removed.
+4 -2
View File
@@ -1,6 +1,6 @@
# DJ workstation — feature/dj_workstation
The main window has two tabs: **Karaoke** and **DJ Studio**. Playback, MIDI handling and selections persist when switching. Native tab pages hide or detach inactive drop destinations so karaoke cannot intercept DJ drops. The DJ library and queue fill the remaining window height. The two bottom status messages and the DJ Settings, Audio Routing and MIDI header buttons have been removed. Settings… (Command-comma) stays available in either workspace and opens the matching Karaoke or DJ scope; choose Devices or MIDI there. Existing singer, venue, rotation, video, background music and recursive directory import features remain available. Background music is a compact strip above karaoke transport. Each tab opens its own settings scope.
The main window has two tabs: **Karaoke Studio** and **DJ Studio**. Playback, MIDI handling and selections persist when switching. Native tab pages hide or detach inactive drop destinations so karaoke cannot intercept DJ drops. The DJ library and queue fill the remaining window height. The two bottom status messages and the DJ Settings, Audio Routing and MIDI header buttons have been removed. Settings… (Command-comma) stays available in either workspace and opens the matching Karaoke or DJ scope; choose Devices or MIDI there. Existing singer, venue, rotation, video, background music and recursive directory import features remain available. Background music is a compact strip above karaoke transport. Each tab opens its own settings scope.
## Using the decks
@@ -76,4 +76,6 @@ Latest validation: **147 tests executed, zero failures, one attached-interface c
Spectrum scrolling caches source-aligned image sections and translates them by fractional pixels as playback advances. On macOS 14+ a view display link schedules refreshes with the current display; macOS 13 uses a timer. Beat and loop markers stay aligned to the same audio-clock position. Cached images are rebuilt after waveform analysis, resize, zoom or colour changes.
Karaoke and DJ imports show a live progress panel with a coloured progress bar, imported/skipped/remaining totals, the current file and a selectable, copyable log. DJ imports, including Finder drops, offer Run in Background; View Progress reopens the panel, and View Log shows the completed report. Scanning, hashing, copying and metadata reads run on a utility background worker with a separate database connection; interface progress updates are throttled to about ten per second. Cancelling retains completed tracks. Duplicate detection reuses existing track IDs, including identical files renamed or selected from another folder; a repeated drop can still load that track into either deck. Different songs are never considered duplicates solely because their titles match.
DJ imports show a live progress panel with a coloured progress bar, imported/skipped/remaining totals, the current file and a selectable, copyable log. DJ imports, including Finder drops, offer Run in Background; View Progress reopens the panel, and View Log shows the completed report. Scanning, hashing, copying and metadata reads run on a utility background worker with a separate database connection; interface progress updates are throttled to about ten per second. Cancelling retains completed tracks. Duplicate detection reuses existing track IDs, including identical files renamed or selected from another folder; a repeated drop can still load that track into either deck. Different songs are never considered duplicates solely because their titles match.
Karaoke Studio imports run in the background without the DJ import modal; import failures use the existing error alert.