[Android] Revert "Fix crash when playing a media container with missing medias"

Nicolas Pomepuy git at videolan.org
Thu Feb 3 09:23:19 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Feb  3 10:11:55 2022 +0100| [a957d4020e926a2291902b74f073ced89049b0c3] | committer: Nicolas Pomepuy

Revert "Fix crash when playing a media container with missing medias"

This reverts commit b84d4020

> https://code.videolan.org/videolan/vlc-android/commit/a957d4020e926a2291902b74f073ced89049b0c3
---

 .../videolan/vlc/viewmodels/mobile/VideosViewModel.kt    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt b/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt
index fe6f0a6ac..9f10267aa 100644
--- a/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt
+++ b/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt
@@ -87,8 +87,8 @@ class VideosViewModel(context: Context, type: VideoGroupingType, val folder: Fol
         val item = provider.pagedList.value?.get(position) ?: return at launch
         withContext(Dispatchers.IO) {
             when (item) {
-                is Folder -> item.getAll(includeMissing = false)
-                is VideoGroup -> item.getAll(includeMissing = false)
+                is Folder -> item.getAll()
+                is VideoGroup -> item.getAll()
                 is MediaWrapper -> listOf(item)
                 else -> null
             }
@@ -99,15 +99,15 @@ class VideosViewModel(context: Context, type: VideoGroupingType, val folder: Fol
         val item = provider.pagedList.value?.get(position) ?: return at launch
         withContext(Dispatchers.IO) {
             when (item) {
-                is Folder -> item.getAll(includeMissing = false)
-                is VideoGroup -> item.getAll(includeMissing = false)
+                is Folder -> item.getAll()
+                is VideoGroup -> item.getAll()
                 else -> null
             }
         }?.let { MediaUtils.appendMedia(context, it) }
     }
 
     internal fun playFoldersSelection(selection: List<Folder>) = viewModelScope.launch {
-        val list = selection.flatMap { it.getAll(includeMissing = false) }
+        val list = selection.flatMap { it.getAll() }
         MediaUtils.openList(context, list, 0)
     }
 
@@ -115,15 +115,15 @@ class VideosViewModel(context: Context, type: VideoGroupingType, val folder: Fol
         val item = provider.pagedList.value?.get(position) ?: return at launch
         withContext(Dispatchers.IO) {
             when (item) {
-                is Folder -> item.getAll(includeMissing = false)
-                is VideoGroup -> item.getAll(includeMissing = false)
+                is Folder -> item.getAll()
+                is VideoGroup -> item.getAll()
                 else -> null
             }
         }?.let { if (activity.isStarted()) activity.addToPlaylist(it) }
     }
 
     internal fun appendFoldersSelection(selection: List<Folder>) = viewModelScope.launch {
-        val list = selection.flatMap { it.getAll(includeMissing = false) }
+        val list = selection.flatMap { it.getAll() }
         MediaUtils.appendMedia(context, list)
     }
 



More information about the Android mailing list