|
@@ -35,6 +35,14 @@ class PlaylistModel: MLBaseModel {
|
|
files.append(item)
|
|
files.append(item)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ func delete(_ items: [VLCMLObject]) {
|
|
|
|
+ for playlist in items where playlist is VLCMLPlaylist {
|
|
|
|
+ if !(medialibrary.deletePlaylist(with: playlist.identifier())) {
|
|
|
|
+ assertionFailure("PlaylistModel: Failed to delete playlist: \(playlist.identifier())")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
// Creates a VLCMLPlaylist appending it and updates linked view
|
|
// Creates a VLCMLPlaylist appending it and updates linked view
|
|
func create(name: String) {
|
|
func create(name: String) {
|
|
append(medialibrary.createPlaylist(with: name))
|
|
append(medialibrary.createPlaylist(with: name))
|