BrowserModel

final class BrowserModel: Sendable

The model for BrowserView

  • The selection of optional genre, artist or album in the BrowserView

    Declaration

    Swift

    var selection = Selection()
  • Details for the ‘highest selected item’

    Declaration

    Swift

    var details: (any KodiItem)?
  • All the items that are available

    Declaration

    Swift

    var library = Media()
  • The filtered items

    Declaration

    Swift

    var items = Media()
  • The current Router selection

    Declaration

    Swift

    var router: Router = .musicBrowser
  • The optional search query

    Declaration

    Swift

    var query: String = ""
  • The media to show in the BrowserView

    See more

    Declaration

    Swift

    struct Media: Equatable, Sendable
  • The optional selection in the BrowserView

    See more

    Declaration

    Swift

    struct Selection: Equatable, Hashable, Sendable
  • Filter the library by Router selection

    The browser library is based on songs; they are filtered first and then the rest is added

    Declaration

    Swift

    func filterLibrary(kodi: KodiConnector, settings: KodioSettings) async
  • Filter the BrowserView based on the optional Selection

    Declaration

    Swift

    func filterBrowser() async