Sfoglia il codice sorgente

VLCMediaLibraryManager: Add playlist methods

Soomin Lee 7 anni fa
parent
commit
acf6598c17
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      SharedSources/VLCMediaLibraryManager.swift

+ 9 - 0
SharedSources/VLCMediaLibraryManager.swift

@@ -176,6 +176,15 @@ extension VLCMediaLibraryManager {
 // MARK: MediaLibrary - Playlist methods
 
 extension VLCMediaLibraryManager {
+
+    func createPlaylist(with name: String) -> VLCMLPlaylist {
+        return medialib.createPlaylist(withName: name)
+    }
+
+    func deletePlaylist(with identifier: VLCMLIdentifier) -> Bool {
+        return medialib.deletePlaylist(withIdentifier: identifier)
+    }
+
     func getPlaylists(sortingCriteria sort: VLCMLSortingCriteria = .default, desc: Bool = false) -> [VLCMLPlaylist] {
         return medialib.playlists(with: sort, desc: desc)
     }