BrowserModel
class BrowserModel : ObservableObject
The model for BrowserView
-
The selection of optional genre, artist or album in the
BrowserView
Declaration
Swift
@Published var selection: BrowserModel.Selection { get set }
-
The state of loading the songs
Declaration
Swift
@Published var state: AppState.State { get set }
-
Details for the ‘highest selected item’
Declaration
Swift
var details: (any KodiItem)? { get }
-
All the items that are available
Declaration
Swift
var library: BrowserModel.Media
-
The current
Router
selectionDeclaration
Swift
let router: Router
-
The optional search query
Declaration
Swift
let query: String
-
Init the model with the current
Router
Declaration
Swift
init(router: Router, query: String)
-
The media to show in the
See moreBrowserView
Declaration
Swift
struct Media : Equatable, Sendable
-
The optional selection in the
See moreBrowserView
Declaration
Swift
struct Selection : Equatable, Hashable
-
filterLibrary()
AsynchronousFilter the library by
Router
selectionThe browser library is based on songs; they are filtered first and then the rest is added
Declaration
Swift
func filterLibrary() async
-
filterBrowser()
AsynchronousFilter the
BrowserView
based on the optionalSelection
Declaration
Swift
func filterBrowser() async -> Media