Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Changes

- Add Apple Photos as a coming-soon built-in crawler with read-only status, refresh, search, platform-native storage paths, and configurable library selection.
- Add Apple Photos as a coming-soon built-in crawler with read-only status, initialization, search, and platform-native storage paths.

### Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public extension BuiltInCrawlApps {
commands: [
"metadata": ["metadata", "--json"],
"status": ["status", "--json"],
"refresh": ["crawl", "--library", "{config:library_path}", "--json"],
"init": ["init", "--json"],
"query": ["search", "--json", "--query"],
],
capabilities: [.status, .refresh, .search],
capabilities: [.status, .search],
statusRequiresSecrets: false,
privacy: .init(
exportsSecrets: false,
Expand All @@ -33,16 +33,6 @@ public extension BuiltInCrawlApps {
"media-metadata",
"location-observations",
"local-model-observations",
]),
configOptions: [
.init(
id: "library_path",
label: "Photos library",
help: "Photos Library package read by refresh; photoscrawl expands a leading ~/ path.",
defaultValue: "~/Pictures/Photos Library.photoslibrary"),
],
configSections: [
.init(id: "photos", title: "Photos Library", optionIDs: ["library_path"]),
])
]))
.withSuggestion(Self.appSuggest("Photos", ["com.apple.Photos"]))
}
10 changes: 8 additions & 2 deletions Sources/CrawlBarSelfTest/SelfTestConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ extension CrawlBarSelfTest {
try Self.expect(config.appConfig(for: BuiltInCrawlApps.photoscrawlID)?.enabled == false, "coming-soon Photos crawler normalizes disabled")
try Self.expect(BuiltInCrawlApps.photoscrawl.availability == .comingSoon, "Photos crawler remains coming soon without an installer")
try Self.expect(
BuiltInCrawlApps.photoscrawl.commands["refresh"] == ["crawl", "--library", "{config:library_path}", "--json"],
"Photos refresh uses the configured library path")
BuiltInCrawlApps.photoscrawl.commands["init"] == ["init", "--json"],
"Photos initialization matches the crawler control contract")
try Self.expect(
BuiltInCrawlApps.photoscrawl.commands["query"] == ["search", "--json", "--query"],
"Photos search matches the crawler control contract")
try Self.expect(BuiltInCrawlApps.photoscrawl.commands["refresh"] == nil, "Photos does not advertise an unsupported refresh action")
try Self.expect(BuiltInCrawlApps.photoscrawl.capabilities == [.status, .search], "Photos capabilities match CrawlBar-supported crawler metadata")
try Self.expect(BuiltInCrawlApps.photoscrawl.configOptions.isEmpty, "Photos does not expose settings absent from crawler metadata")
let oldConfig = CrawlBarConfig(
version: 1,
apps: [CrawlBarAppConfig(id: BuiltInCrawlApps.wacliID, enabled: false, showInMenuBar: false)]).normalized()
Expand Down