|
@@ -11,10 +11,23 @@
|
|
|
import Foundation
|
|
|
|
|
|
class CollectionModel: MLBaseModel {
|
|
|
+ typealias MLType = VLCMLMedia
|
|
|
+
|
|
|
var sortModel: SortModel
|
|
|
+
|
|
|
var mediaCollection: MediaCollectionModel
|
|
|
|
|
|
- typealias MLType = VLCMLMedia // could be anything
|
|
|
+ var medialibrary: MediaLibraryService
|
|
|
+
|
|
|
+ var updateView: (() -> Void)?
|
|
|
+
|
|
|
+ var files = [VLCMLMedia]()
|
|
|
+
|
|
|
+ var cellType: BaseCollectionViewCell.Type { return MediaCollectionViewCell.self }
|
|
|
+
|
|
|
+ // No indicator for this model so no localization needed.
|
|
|
+ var indicatorName: String = "Collections"
|
|
|
+
|
|
|
required init(medialibrary: MediaLibraryService) {
|
|
|
preconditionFailure("")
|
|
|
}
|
|
@@ -31,16 +44,6 @@ class CollectionModel: MLBaseModel {
|
|
|
files.append(item)
|
|
|
}
|
|
|
|
|
|
- var medialibrary: MediaLibraryService
|
|
|
- var updateView: (() -> Void)?
|
|
|
-
|
|
|
- var files = [VLCMLMedia]()
|
|
|
-
|
|
|
- var cellType: BaseCollectionViewCell.Type { return MediaCollectionViewCell.self }
|
|
|
-
|
|
|
- // No indicator for this model so no localization needed.
|
|
|
- var indicatorName: String = "Collections"
|
|
|
-
|
|
|
func delete(_ items: [VLCMLObject]) {
|
|
|
if let playlist = mediaCollection as? VLCMLPlaylist {
|
|
|
for case let media as VLCMLMedia in items {
|