Array

extension Array where Element: Hashable
extension Array where Element == Audio.Details.Song
extension Array where Element == Video.Details.Movie
extension Array where Element == Video.Details.MusicVideo
extension Array where Element == Video.Details.TVShow
extension Array where Element == any KodiItem
extension Array where Element: KodiItem

Available where Element: Hashable

  • Remove duplicates from an Array

    Declaration

    Swift

    public func removingDuplicates() -> [Element]

    Return Value

    An new Array with unique elements

Available where Element == Audio.Details.Song

  • Play an array of Song

    Declaration

    Swift

    public func play(shuffle: Bool = false)
  • Search an array of Song by the a query

    Declaration

    Swift

    public func search(_ query: String) -> [Audio.Details.Song]

    Parameters

    query

    The search query

    Return Value

    An array of Song

Available where Element == Video.Details.Movie

  • Search an array of Video/Details/Movie by the a query

    Declaration

    Swift

    public func search(_ query: String) -> [Video.Details.Movie]

    Parameters

    query

    The search query

    Return Value

    An array of Video/Details/Movie

Available where Element == Video.Details.MusicVideo

  • Search an array of Video/Details/MusicVideo by the a query

    Declaration

    Swift

    public func search(_ query: String) -> [Video.Details.MusicVideo]

    Parameters

    query

    The search query

    Return Value

    An array of Video/Details/MusicVideo

  • Play an array of Video.Details.MusicVideo

    Declaration

    Swift

    public func play(shuffle: Bool = false)
  • Filter the music videos to have only one video representing an album

    Declaration

    Swift

    public func uniqueAlbum() -> [Video.Details.MusicVideo]

    Return Value

    A list with music videos without duplicated albums

Available where Element == Video.Details.TVShow

  • Search an array of Video/Details/TVShow by the a query

    Declaration

    Swift

    public func search(_ query: String) -> [Video.Details.TVShow]

    Parameters

    query

    The search query

    Return Value

    An array of Video/Details/TVShow

Available where Element == anyKodiItem

  • Sort an Array of KodiItem’s

    Declaration

    Swift

    public func sorted(sortItem: List.Sort) -> Array

    Parameters

    sortItem

    The sorting

    Return Value

    A sorted Array

Available where Element: KodiItem

  • Sort an Array of KodiItem’s of a specific type

    Declaration

    Swift

    public func sorted(sortItem: List.Sort) -> Array

    Parameters

    sortItem

    The sorting

    Return Value

    A sorted Array

Available where Element == anyKodiItem

  • Sort an Array of KodiItem’s

    Declaration

    Swift

    public mutating func sort(sortItem: List.Sort)

    Parameters

    sortItem

    The sorting

    Return Value

    A sorted Array

Available where Element: KodiItem

  • Sort an Array of KodiItem’s of a specific type

    Declaration

    Swift

    public mutating func sort(sortItem: List.Sort)

    Parameters

    sortItem

    The sorting

    Return Value

    A sorted Array