removed unwanted bar

This commit is contained in:
Mark Gregory
2026-11-06 09:51:44 +00:00
parent b1868ee2d3
commit 794fa595d7
7 changed files with 285 additions and 37 deletions
+11
View File
@@ -25,6 +25,7 @@ struct Importer {
let media: URL
var audioExtensions: Set<String> = ["mp3","wav","m4a","mp4","m4v","mov"]
var includeGraphics = true
var waveformCache: URL? = nil
@discardableResult func run(_ urls: [URL],library: Library,copyMedia: Bool = true,cancelled: () -> Bool = { false },progress: (ImportProgress) -> Void = { _ in }) throws -> [Int64] {
try ManagedMediaStorage.prepare(media)
var state = ImportProgress()
@@ -252,6 +253,16 @@ struct Importer {
try remember(audio,signature,id)
state.completed += 1
state.logLines.append("[IMPORTED] "+sourcePath(audio))
if let waveformCache {
report("Generating waveform: "+audio.lastPathComponent,force:true)
do {
if (try? WaveformCache.load(audio:dest,directory:waveformCache)) == nil {
let waveform = try AudioWaveform.analyse(url:dest,cancelled:cancelled)
try WaveformCache.save(waveform,audio:dest,directory:waveformCache)
}
} catch is CancellationError { throw CancellationError() }
catch { state.logLines.append("[WARNING] Waveform unavailable for "+sourcePath(audio)+": "+error.localizedDescription) }
}
report(audio.lastPathComponent,force:state.completed == 1)
}
for archive in archives {