Closed ChriD closed 7 years ago
Playlist now can be created and deleted by using the playlistController
e.g.
raumkernel.nativePlaylistController.createPlaylist("RAUMKERNELTEST").then(function(){
raumkernel.nativePlaylistController.deletePlaylist("RAUMKERNELTEST");
});
Rename of playlist works too
raumkernel.nativePlaylistController.createPlaylist("RAUMKERNELTEST").then(function(){
raumkernel.nativePlaylistController.renamePlaylist("RAUMKERNELTEST", "RAUMKERNELTEST X")
});
Pulled with 1.0.13
Playlist items can now be added, deleted and beeing removed. Example:
// Add a container item to playlist (That means an item which direct childs are tracks)
raumkernel.nativePlaylistController.addItemToPlaylist("RAUMKERNELTEST", "0/My Music/Artists/4%20Non%20Blondes/4%20Non%20Blondes+What%27s%20Up", 294967295, true);
// Add one item to playlist. Here the mediaItemid is a track
raumkernel.nativePlaylistController.addItemToPlaylist("RAUMKERNELTEST", "0/My Music/Artists/Dido/Dido+No%20Angel/c7e7ad4423927a75c5017b2640db6574");
// Move an item in playlist to position 2 (index starts with 0)
raumkernel.nativePlaylistController.moveItemInPlaylist("RAUMKERNELTEST", "0/Playlists/MyPlaylists/RAUMKERNELTEST/31990", 1);
// Remove first and second item from playlist
raumkernel.nativePlaylistController.removeItemsFromPlaylist("RAUMKERNELTEST", 0, 1);
Create/Update/Delete native RF "Playlists" as given in the "My Playlists" node