Settings

public enum Settings

Settings modification (Kodi Namespace)

getCategories

  • Retrieves all setting categories (Kodi API)

    Declaration

    Swift

    public static func getCategories(section: Setting.Section) async -> [Setting.Details.Category]

    Parameters

    section

    The section for the categories

    Return Value

    All categories from the selected section

getSections

  • getSections() Asynchronous

    Retrieves all setting sections (Kodi API)

    Declaration

    Swift

    public static func getSections() async -> [Setting.Details.Section]

    Return Value

    All setting sections

getSettings

  • Retrieves all settings (Kodi API)

    Note

    Both must be nill or set or else it does not work

    Declaration

    Swift

    public static func getSettings(section: Setting.Section? = nil, category: Setting.Category? = nil) async -> [Setting.Details.KodiSetting]

    Parameters

    section

    Optional section

    category

    Optional category

    Return Value

    All settings, filtered by optional section and category

setSettingValue

  • Changes the value of a setting (Kodi API)

    Declaration

    Swift

    public static func setSettingValue(setting: Setting.ID, int: Int? = nil, bool: Bool? = nil, string: String? = nil, list: [Int]? = nil) async

    Parameters

    setting

    The ID to set

    int

    The optional Int value

    bool

    The optional Bool value

    string

    The optional String value

    list

    The optional [Int] value