26 lines
1.4 KiB
Swift
26 lines
1.4 KiB
Swift
import Foundation
|
|
|
|
/// Single source of truth for the in-repo subsystem directories. The helper
|
|
/// subsystems (`mcp`, `governor`, `recommender`, `search`) used to be separate
|
|
/// repos the app reached into via scattered `~/Code/@applications/...` literals;
|
|
/// they are now folded into this one repo. Override the repo root with
|
|
/// `$TV_ANARCHY_REPO` for a non-default checkout location (CI, a clone elsewhere).
|
|
public enum RepoPaths {
|
|
/// The tv-anarchy repo root.
|
|
public static var root: URL {
|
|
if let p = ProcessInfo.processInfo.environment["TV_ANARCHY_REPO"], !p.isEmpty {
|
|
return URL(fileURLWithPath: p, isDirectory: true)
|
|
}
|
|
return FileManager.default.homeDirectoryForCurrentUser
|
|
.appendingPathComponent("Code/@applications/tv-anarchy")
|
|
}
|
|
|
|
/// `plum-control-mcp` CLI (VLC / black-tv / transmission / search bridge).
|
|
public static var mcp: URL { root.appendingPathComponent("mcp") }
|
|
/// `portable-net-tv` governor (watch + prefetch + porn-rotation tool).
|
|
public static var governor: URL { root.appendingPathComponent("governor") }
|
|
/// `media-recommender` (TMDB/IMDb enrich + local recs + registry.md).
|
|
public static var recommender: URL { root.appendingPathComponent("recommender") }
|
|
/// `torrent-search-mcp` fork (the Python search the `mcp` CLI shells into).
|
|
public static var search: URL { root.appendingPathComponent("search") }
|
|
}
|