PM-.snap-Import (FieldsToApply, Merge, Aufnahmedatum), Aufnahmeort/Copyright-Status/DataMining, FTP-Profile Beautiful Sports
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
0b41f09206
commit
42ab9c9361
13 files changed
+472
-39
No files matched your search
@@ -66,9 +66,23 @@ final class AppState: ObservableObject {
|
||||
templates = Storage.load([IPTCTemplate].self, from: Storage.templatesURL) ?? []
|
||||
codes = Storage.load(CodeReplacements.self, from: Storage.codesURL) ?? CodeReplacements()
|
||||
uploads.state = self
|
||||
seedDefaultsIfNeeded()
|
||||
startLightroomPolling()
|
||||
}
|
||||
|
||||
/// First launch: agency FTP profiles (host/user are placeholders – adjust in Settings → FTP).
|
||||
private func seedDefaultsIfNeeded() {
|
||||
guard settings.ftpDestinations.isEmpty, !UserDefaults.standard.bool(forKey: "seededFTP") else { return }
|
||||
UserDefaults.standard.set(true, forKey: "seededFTP")
|
||||
let host = "beautifulsports.ftp.xxx.com"
|
||||
settings.ftpDestinations = [
|
||||
FTPDestination(name: "Beautiful Sports – Sport", proto: .ftp, host: host, port: 21,
|
||||
remoteDirectory: "/Tonhäuser_Sport", passive: true, variant: .jpeg),
|
||||
FTPDestination(name: "Beautiful Sports – Stock", proto: .ftp, host: host, port: 21,
|
||||
remoteDirectory: "/Tonhäuser_Stock", passive: true, variant: .jpeg),
|
||||
]
|
||||
}
|
||||
|
||||
// MARK: exiftool
|
||||
|
||||
var exiftool: ExifTool? {
|
||||
@@ -329,11 +343,11 @@ final class AppState: ObservableObject {
|
||||
panel.allowedContentTypes = []
|
||||
panel.allowsOtherFileTypes = true
|
||||
panel.allowsMultipleSelection = true
|
||||
panel.message = "Photo Mechanic Vorlage(n) (.xmp) oder Bilder mit IPTC wählen"
|
||||
panel.message = "Photo-Mechanic-Vorlage(n) (.snap / .xmp) oder Bilder mit IPTC wählen"
|
||||
guard panel.runModal() == .OK else { return }
|
||||
for url in panel.urls {
|
||||
do {
|
||||
if url.pathExtension.lowercased() == "xmp" || url.pathExtension.lowercased() == "xml" {
|
||||
if ["xmp", "xml", "snap"].contains(url.pathExtension.lowercased()) {
|
||||
templates.append(try XMPTemplateIO.importTemplate(from: url))
|
||||
} else {
|
||||
try templateFromImage(url)
|
||||
|
||||
Reference in new issue
Block a user