فهرست منبع

MediaLibraryService: Set currentlyPlayingMedia return value as optinal

Soomin Lee 6 سال پیش
والد
کامیت
c7abccf26a
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      SharedSources/MediaLibraryService.swift

+ 2 - 2
SharedSources/MediaLibraryService.swift

@@ -304,8 +304,8 @@ extension MediaLibraryService {
 
     func savePlaybackState(from player: VLCPlaybackController) {
 
-        let media = player.currentlyPlayingMedia
-        guard let mlMedia = fetchMedia(with: media.url.absoluteURL) else {
+        let media: VLCMedia? = player.currentlyPlayingMedia
+        guard let mlMedia = fetchMedia(with: media?.url.absoluteURL) else {
             // we opened a url and not a local file
             return
         }