|
@@ -40,7 +40,13 @@ class CollectionModel: MLBaseModel {
|
|
|
var indicatorName: String = "Collections"
|
|
|
|
|
|
func delete(_ items: [VLCMLObject]) {
|
|
|
- assertionFailure("still needs implementation")
|
|
|
+ if let playlist = mediaCollection as? VLCMLPlaylist {
|
|
|
+ for case let media as VLCMLMedia in items {
|
|
|
+ if let index = files.firstIndex(of: media) {
|
|
|
+ playlist.removeMedia(fromPosition: UInt32(index))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|