import Defaults extension Defaults.Keys { #if os(tvOS) static let layout = Key("listingLayout", default: .cells) #endif static let instances = Key<[Instance]>("instances", default: []) static let accounts = Key<[Instance.Account]>("accounts", default: []) static let selectedPlaylistID = Key("selectedPlaylistID") static let showingAddToPlaylist = Key("showingAddToPlaylist", default: false) static let videoIDToAddToPlaylist = Key("videoIDToAddToPlaylist") static let recentlyOpened = Key<[RecentItem]>("recentlyOpened", default: []) static let quality = Key("quality", default: .hd720pFirstThenBest) } enum ListingLayout: String, CaseIterable, Identifiable, Defaults.Serializable { case list, cells var id: String { rawValue } var name: String { switch self { case .list: return "List" case .cells: return "Cells" } } }