IPTC-Info- und Aufgaben-Fenster wie PM, Ingest im Hintergrund + Karten-Erkennung, ⌘E Lightroom, RAW/SENT-Workflow, schnellere Auswahl, Zahlen = Sterne

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012bGzgsxrmbBhDzeMV2L57D
This commit is contained in:
Lichtkasten DevandClaude Opus 5.5 committed 2026-11-03 23:27:14 +00:00
1 parent 42ab9c9361
commit d100249c12
18 files changed
+977 -213

No files matched your search

@@ -26,10 +26,12 @@ public struct IngestProgress: Sendable {
public enum IngestService {
/// Copies all images (and their XMP sidecars) from `sources`. Returns the destination folders used.
public static func run(sources: [URL], settings: IngestSettings, exiftool: ExifTool,
onFolder: (@Sendable (URL) -> Void)? = nil,
progress: @escaping @Sendable (IngestProgress) -> Void) async throws -> [URL] {
let fm = FileManager.default
var items: [PhotoItem] = []
for s in sources { items += try FolderScanner.scan(folder: s, recursive: true) }
progress(IngestProgress(done: 0, total: items.count, currentFile: "Lese Aufnahmedaten …"))
guard !settings.primaryDestination.isEmpty else { throw UploadError.failed("Kein Ziel für den Ingest gewählt.") }
// Read capture dates for folder/rename patterns in one go.
@@ -44,7 +46,9 @@ public enum IngestService {
let total = items.reduce(0) { $0 + 1 + $1.companions.count }
var done = 0
progress(IngestProgress(done: 0, total: total, currentFile: "Starte …"))
for item in items {
try Task.checkCancellation()
let ctx = VariableContext.make(fileURL: item.primary, exif: item.exif, sequence: seq, iptc: item.iptc)
let sub = VariableExpander.expand(settings.folderPattern, context: ctx)
.replacingOccurrences(of: ":", with: "-")
@@ -56,7 +60,7 @@ public enum IngestService {
for destRoot in [settings.primaryDestination, settings.backupDestination] where !destRoot.isEmpty {
let folder = sub.isEmpty ? URL(fileURLWithPath: destRoot) : URL(fileURLWithPath: destRoot).appendingPathComponent(sub)
try fm.createDirectory(at: folder, withIntermediateDirectories: true)
if destRoot == settings.primaryDestination { usedFolders.insert(folder) }
if destRoot == settings.primaryDestination, usedFolders.insert(folder).inserted { onFolder?(folder) }
var files = [item.primary] + item.companions
if item.kind.usesSidecar, fm.fileExists(atPath: item.sidecarURL.path) { files.append(item.sidecarURL) }
for src in files {
@@ -19,6 +19,8 @@ public struct LightroomJob: Codable, Identifiable, Sendable {
public var rewriteIPTCAfterExport: Bool
/// Upload targets applied after export (FTP destination ids, "immich").
public var uploadTargets: [String]
/// ⌘E – switch Lightroom to the Develop module with the photos selected.
public var openDevelop: Bool = false
public init(id: String = UUID().uuidString, files: [URL], developPreset: String = "", collection: String = "",
export: Bool = false, exportFolder: URL? = nil, jpegQuality: Int = 90, longEdge: Int = 0,
@@ -35,7 +37,7 @@ public struct LightroomJob: Codable, Identifiable, Sendable {
var lines = ["version=1", "id=\(id)", "preset=\(developPreset)", "collection=\(collection)",
"export=\(export ? 1 : 0)", "exportFolder=\(exportFolder?.path ?? "")",
"quality=\(jpegQuality)", "longEdge=\(longEdge)", "sharpening=\(sharpening)",
"colorSpace=\(colorSpace)"]
"colorSpace=\(colorSpace)", "develop=\(openDevelop ? 1 : 0)"]
lines += files.map { "file=\($0.path)" }
return lines.map { $0.replacingOccurrences(of: "\n", with: " ") }.joined(separator: "\n") + "\n"
}