Remove dead code found by Periphery on all platforms

Delete declarations that Periphery reports unused on every platform that
compiles them (iOS, macOS, tvOS), including nine views used only by their
own previews. Platform-gated code still used on another platform, device-
only MPV render paths, migration models, CloudKit record names, App
Intents metadata and unused parameters are kept.
This commit is contained in:
Arkadiusz Fal
2026-10-08 23:57:56 +02:00
parent 45e19e6536
commit 4770bbe3b9
141 changed files with 14 additions and 4191 deletions

View File

@@ -206,12 +206,6 @@ actor YatteeServerAPI: InstanceAPI {
}
}
func streams(videoID: String, instance: Instance) async throws -> [Stream] {
let endpoint = GenericEndpoint.get("/api/v1/videos/\(videoID)")
let response: YatteeVideoDetails = try await httpClient.fetch(endpoint, baseURL: instance.url)
return response.toStreams()
}
func captions(videoID: String, instance: Instance) async throws -> [Caption] {
let endpoint = GenericEndpoint.get("/api/v1/videos/\(videoID)")
let response: YatteeVideoDetails = try await httpClient.fetch(endpoint, baseURL: instance.url)
@@ -237,12 +231,6 @@ actor YatteeServerAPI: InstanceAPI {
return ChannelSearchPage(items: items, nextPage: hasResults ? page + 1 : nil)
}
/// Fetches video details, streams, and captions in a single API call.
func videoWithStreamsAndCaptions(id: String, instance: Instance) async throws -> (video: Video, streams: [Stream], captions: [Caption]) {
let result = try await videoWithStreamsAndCaptionsAndStoryboards(id: id, instance: instance)
return (video: result.video, streams: result.streams, captions: result.captions)
}
func videoWithStreamsAndCaptionsAndStoryboards(id: String, instance: Instance) async throws -> (video: Video, streams: [Stream], captions: [Caption], storyboards: [Storyboard]) {
let endpoint = GenericEndpoint.get("/api/v1/videos/\(id)")
let response: YatteeVideoDetails = try await httpClient.fetch(endpoint, baseURL: instance.url)
@@ -268,16 +256,6 @@ actor YatteeServerAPI: InstanceAPI {
case download
}
/// Fetches streams with URLs that proxy through the Yattee Server.
func proxyStreams(videoID: String, instance: Instance, mode: ProxyMode) async throws -> [Stream] {
let endpoint = GenericEndpoint.get(
"/api/v1/videos/\(videoID)",
query: ["proxy": "true", "proxy_mode": mode.rawValue]
)
let response: YatteeVideoDetails = try await httpClient.fetch(endpoint, baseURL: instance.url)
return response.toStreams()
}
/// Fetches video details, proxy streams, captions, and storyboards in a single API call.
func videoWithProxyStreamsAndCaptionsAndStoryboards(id: String, instance: Instance, mode: ProxyMode) async throws -> (video: Video, streams: [Stream], captions: [Caption], storyboards: [Storyboard]) {
let endpoint = GenericEndpoint.get(
@@ -1324,10 +1302,6 @@ private struct YatteeChannel: Decodable, Sendable {
}
}
private struct YatteeChannelVideos: Decodable, Sendable {
let videos: [YatteeVideo]
}
private struct YatteeChannelSearchResponse: Decodable, Sendable {
let videos: [YatteeVideo]
}