|
@@ -23,22 +23,17 @@ class AudioModel: MLBaseModel {
|
|
required init(medialibrary: VLCMediaLibraryManager) {
|
|
required init(medialibrary: VLCMediaLibraryManager) {
|
|
self.medialibrary = medialibrary
|
|
self.medialibrary = medialibrary
|
|
medialibrary.addObserver(self)
|
|
medialibrary.addObserver(self)
|
|
- // created too late so missed the callback asking if he has anything
|
|
|
|
files = medialibrary.media(ofType: .audio)
|
|
files = medialibrary.media(ofType: .audio)
|
|
}
|
|
}
|
|
|
|
|
|
- func isIncluded(_ item: VLCMLMedia) {
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
func append(_ item: VLCMLMedia) {
|
|
func append(_ item: VLCMLMedia) {
|
|
- // need to check more for duplicate and stuff
|
|
|
|
files.append(item)
|
|
files.append(item)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
// MARK: - Sort
|
|
// MARK: - Sort
|
|
|
|
|
|
extension AudioModel {
|
|
extension AudioModel {
|
|
-
|
|
|
|
func sort(by criteria: VLCMLSortingCriteria) {
|
|
func sort(by criteria: VLCMLSortingCriteria) {
|
|
// FIXME: Currently if sorted by name, the files are sorted by filename but displaying title
|
|
// FIXME: Currently if sorted by name, the files are sorted by filename but displaying title
|
|
files = medialibrary.media(ofType: .audio, sortingCriteria: criteria, desc: false)
|
|
files = medialibrary.media(ofType: .audio, sortingCriteria: criteria, desc: false)
|