AudioLibrary
public enum AudioLibrary
Audio Library information (Kodi Namespace)
-
getAlbums()
Asynchronous
-
getArtists()
Asynchronous
-
getArtistDetails(artistID:
Asynchronous)
-
getGenres()
Asynchronous
-
getSongs(filter:
Asynchronoussort: limits: ) Retrieve all songs (Kodi API)
Limitations
Loading songs from the host can be expensive!
Examples
The 10 last played songs:
let lastPlayed = await AudioLibrary.getSongs( sort: List.Sort(method: .lastPlayed, order: .descending), limits: List.Limits(end: 10) )
The tracks from a specific album:
let albumTracks = await AudioLibrary.getSongs( filter: List.Filter(albumID: 3), sort: List.Sort(method: .track, order: .ascending) )
Declaration
Parameters
filter
An optional filter
sort
The sort order
limits
The optional limits of the request
Return Value
All requested songs from the library
-
getSongs(modificationDate:
Asynchronous)
-
getSongDetails(songID:
Asynchronous)
-
setSongDetails(song:
Asynchronous)
-
getProperties()
Asynchronous