Commit db696819 authored by Soomin Lee's avatar Soomin Lee

AudioModel: Add sort

parent fde98b5f
......@@ -35,6 +35,17 @@ class AudioModel: MLBaseModel {
files.append(item)
}
}
// MARK: - Sort
extension AudioModel {
func sort(by criteria: VLCMLSortingCriteria) {
// FIXME: Currently if sorted by name, the files are sorted by filename but displaying title
files = medialibrary.media(ofType: .audio, sortingCriteria: criteria, desc: false)
updateView?()
}
}
extension AudioModel: MediaLibraryObserver {
func medialibrary(_ medialibrary: VLCMediaLibraryManager, didAddAudio audio: [VLCMLMedia]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment