// // JellyfinServerInfo.swift // // Copyright 2026 Brendan Szymanski // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // SPDX-License-Identifier: GPL-3.0-or-later // /// Identifying details about a Jellyfin server. /// /// Serves both the pre-auth public endpoint and the authenticated one; the public response simply /// leaves more fields `nil`. Fetching this is also how Luminate tests whether a URL points at a /// reachable Jellyfin server. package struct JellyfinServerInfo: Hashable, Sendable { /// The server's stable identifier. package var id: String? /// The administrator-chosen server name. package var serverName: String? /// The server version, such as `10.11.10`. package var version: String? /// The product name the server reports, normally `Jellyfin Server`. package var productName: String? /// The operating system the server runs on. package var operatingSystem: String? /// The server's address on the local network. package var localAddress: String? /// Whether first-run setup has been completed; a server still in setup rejects normal traffic. package var startupWizardCompleted: Bool? /// Creates server information, defaulting every unspecified field to `nil`. /// /// Each parameter sets the property of the same name. package init( id: String? = nil, serverName: String? = nil, version: String? = nil, productName: String? = nil, operatingSystem: String? = nil, localAddress: String? = nil, startupWizardCompleted: Bool? = nil ) { self.id = id self.serverName = serverName self.version = version self.productName = productName self.operatingSystem = operatingSystem self.localAddress = localAddress self.startupWizardCompleted = startupWizardCompleted } }