broken changes

This commit is contained in:
Mark Gregory
2026-11-05 13:01:47 +00:00
parent abee603250
commit d5b24bff29
6 changed files with 150 additions and 5 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ enum FileTagWriter {
guard exporter.supportedFileTypes.contains(type) else { throw LibraryError.message("This container cannot preserve its media during tag export") }
exporter.outputURL = temp;exporter.outputFileType = type
let keys: [AVMetadataKey] = [.commonKeyTitle,.commonKeyArtist,.commonKeyAlbumName,.commonKeyPublisher]
var items = asset.metadata.filter{!keys.contains($0.commonKey ?? AVMetadataKey(rawValue:""))}
var items = try await asset.load(.metadata).filter{!keys.contains($0.commonKey ?? AVMetadataKey(rawValue:""))}
for (identifier,value) in [(AVMetadataIdentifier.commonIdentifierTitle,song.title),(.commonIdentifierArtist,song.artist),(.commonIdentifierAlbumName,song.album),(.commonIdentifierPublisher,song.label)] {
let item = AVMutableMetadataItem();item.identifier = identifier;item.value = value as NSString;items.append(item)
}