Playlist

public enum Playlist

Playlist modification (Kodi Namespace & Kodi Global Type)

Note

Fuctions in Playlist that will give a response are ‘Asynchronous’; others are not
  • ID

    The ID of the playlist (Global Kodi Type)

    See more

    Declaration

    Swift

    enum ID : Int, Codable
  • The position in the playlist

    Declaration

    Swift

    typealias position = Int

add

  • add(stream:) Asynchronous

    Add a stream to the playlist (Kodi API)

    Declaration

    Swift

    public static func add(stream: Audio.Details.Stream) async

    Parameters

    stream

    The Stream item

  • add(songs:) Asynchronous

    Add songs to the playlist (Kodi API)

    Declaration

    Swift

    public static func add(songs: [Audio.Details.Song]) async

    Parameters

    songs

    An array of Song items

  • add(musicVideos:) Asynchronous

    Add music videos to the playlist (Kodi API)

    Declaration

    Swift

    public static func add(musicVideos: [Video.Details.MusicVideo]) async

    Parameters

    musicVideos

    An array of Video/Details/MusicVideo items

clear

  • Clear playlist (Kodi API)

    Declaration

    Swift

    public static func clear(playlistID: Playlist.ID)

    Parameters

    playlistID

    The ID of the player to clear

getItems

  • getItems(playlistID:) Asynchronous

    Get all items from playlist (Kodi API)

    Declaration

    Swift

    public static func getItems(playlistID: Playlist.ID) async -> [(any KodiItem)]?

    Parameters

    playlistID

    The ID of the playlist

    Return Value

    All items in an KodiItem array