[Android] Fix remote access play endpoint when playing a file from the browser

Nicolas Pomepuy git at videolan.org
Wed Aug 27 12:48:55 UTC 2025


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Aug 20 11:52:40 2025 +0200| [09b84b8bc34fb9703b5f2100d7e30c5290ebe4ca] | committer: Nicolas Pomepuy

Fix remote access play endpoint when playing a file from the browser

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

 .../java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt b/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt
index b193669c79..79930202c8 100644
--- a/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt
+++ b/application/remote-access-server/src/main/java/org/videolan/vlc/remoteaccessserver/RemoteAccessRouting.kt
@@ -983,8 +983,9 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
 
                 val medias = appContext.getFromMl {
                     if (path?.isNotBlank() == true) {
-                        if (id.toLong() > 0)
-                            arrayOf(getMedia(id.toLong()))
+                        val media = getMedia(path.toUri())
+                        if (media != null)
+                            arrayOf(media)
                         else
                             arrayOf(MLServiceLocator.getAbstractMediaWrapper(path.toUri()))
                     } else when (type) {



More information about the Android mailing list