Bugfixes aus dem Projekt-Review (27 Punkte)
Datenverlust: - Ingest löscht keine vorhandenen Fotos mehr: gleiche Namen (zweiter Body/zweite Karte) bekommen -1, -2 … - Ingest-Vorlage nur auf die neu kopierten Fotos, nicht auf den ganzen Ordner - Neue Dateien brechen das Laden der Metadaten nicht mehr ab - Code-Dateien in Windows-1252/Mac Roman werden nicht mehr als UTF-16-Zeichensalat gelesen - Code-Bibliothek und Teams werden tolerant gelesen (fehlende Felder löschen nichts mehr) - IPTC-Fenster speichert offene Änderungen, wenn das Bild von außen gewechselt wird - Datum mit Uhrzeit bleibt beim Speichern erhalten; Lightroom-„abgelehnt“ (-1) bleibt erhalten - gesperrte Fotos: beim Ingest nur getaggt, Sterne aus der Kamera bleiben Zuverlässigkeit: - exiftool-Fehlermeldungen werden sicher erkannt (Marker auf stderr statt 5 ms warten) - ein defektes Bild kostet nicht mehr 49 andere ihre Metadaten - LR-Export: Upload/IPTC auch nach Ordnerwechsel, Zeitlimit für Jobs ohne Antwort - Trikot-Erkennung bleibt beim Ordnerwechsel beim richtigen Ordner; nach Ingest mit den neuen Fotos - Absturz beim Löschen eines FTP-Servers behoben - doppelte Namen beim FTP-Umbenennen werden nummeriert; Wiederholen öffnet die Aufgabe wieder - Vorschau-Cache beachtet die angeforderte Größe (echte 100 %-Ansicht) - Ingest: Verlauf auch bei Abbruch gespeichert, keine Lücken in der Laufnummer - Auswerfen schließt keine Tabs anderer Karten; eigener exiftool-Pfad hat Vorrang Tempo: Massenänderungen sortieren die Liste einmal statt pro Bild, Einstellungen werden verzögert gespeichert. Tests für Namenskollision, Kodierung, tolerante Code-Bibliothek und Datum mit Uhrzeit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bGzgsxrmbBhDzeMV2L57D
This commit is contained in:
1 parent
dd022b6900
commit
1f63714b73
12 files changed
+299
-56
No files matched your search
@@ -53,7 +53,20 @@ struct IPTCInfoWindow: View {
|
||||
.onDisappear {
|
||||
if let m = arrowMonitor { NSEvent.removeMonitor(m); arrowMonitor = nil }
|
||||
}
|
||||
.onChange(of: state.cursorID) { _, _ in load(force: true) }
|
||||
.onChange(of: state.cursorID) { _, _ in
|
||||
// cursor moved from outside (click in the contact sheet …) while edits are open → keep them:
|
||||
// they are saved to the image they were typed for instead of being thrown away
|
||||
if !dirty.isEmpty, let id = loadedID, id != state.cursorID, let previous = state.item(id) {
|
||||
let fields = IPTCField.all.filter { dirty.contains($0.id) }
|
||||
let values = IPTCValues(texts: texts)
|
||||
Task {
|
||||
if await state.applyIPTCAndWait(values, fields: fields, to: [previous]) {
|
||||
state.statusText = "Änderungen an \(previous.filename) gespeichert"
|
||||
}
|
||||
}
|
||||
}
|
||||
load(force: true)
|
||||
}
|
||||
.onReceive(state.$items) { _ in if dirty.isEmpty { DispatchQueue.main.async { load(force: false) } } }
|
||||
.task(id: item.map { state.previewURL(for: $0) }) { await loadImage() }
|
||||
}
|
||||
@@ -275,7 +288,8 @@ struct IPTCInfoWindow: View {
|
||||
|
||||
@discardableResult
|
||||
private func save() async -> Bool {
|
||||
guard let item, !dirty.isEmpty else { return true }
|
||||
// the image the form was loaded for (not whatever the cursor points at right now)
|
||||
guard let item = loadedID.flatMap({ state.item($0) }) ?? item, !dirty.isEmpty else { return true }
|
||||
saving = true
|
||||
defer { saving = false }
|
||||
let fields = IPTCField.all.filter { dirty.contains($0.id) }
|
||||
|
||||
@@ -135,8 +135,14 @@ struct FTPSettings: View {
|
||||
HStack {
|
||||
Button { let d = FTPDestination(); state.settings.ftpDestinations.append(d); selected = d.id } label: { Image(systemName: "plus") }
|
||||
Button {
|
||||
if let i = index { Keychain.set("", account: state.settings.ftpDestinations[i].keychainAccount)
|
||||
state.settings.ftpDestinations.remove(at: i); selected = nil }
|
||||
// first leave the form (its bindings use the index), then remove by id – otherwise
|
||||
// SwiftUI may still read the old index → "Index out of range"
|
||||
guard let id = selected, let d = state.settings.ftpDestinations.first(where: { $0.id == id }) else { return }
|
||||
selected = nil
|
||||
DispatchQueue.main.async {
|
||||
Keychain.set("", account: d.keychainAccount)
|
||||
state.settings.ftpDestinations.removeAll { $0.id == id }
|
||||
}
|
||||
} label: { Image(systemName: "minus") }.disabled(index == nil)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user