[Android] Remote access: provide the right icons for subtitle or unknown files

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


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Aug 21 07:45:09 2025 +0200| [bb215dcaa3525b126b12f74d87f4ce96d76314db] | committer: Nicolas Pomepuy

Remote access: provide the right icons for subtitle or unknown files

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

 .../vlc/remoteaccessserver/RemoteAccessRouting.kt      | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

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 1f15c43d97..07d1434e1a 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
@@ -1358,6 +1358,24 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
                     return at get
                 }
             }
+            if (type == "file_big") {
+                BitmapUtil.encodeImage(BitmapUtil.vectorToBitmap(appContext, R.drawable.ic_unknown_big, 256, 256), true)?.let {
+                    call.respondBytes(ContentType.Image.PNG) { it }
+                    return at get
+                }
+            }
+            if (type == "subtitle") {
+                BitmapUtil.encodeImage(BitmapUtil.vectorToBitmap(appContext, R.drawable.ic_subtitles, 256, 256), true)?.let {
+                    call.respondBytes(ContentType.Image.PNG) { it }
+                    return at get
+                }
+            }
+            if (type == "subtitle_big") {
+                BitmapUtil.encodeImage(BitmapUtil.vectorToBitmap(appContext, R.drawable.ic_subtitles, 512, 512), true)?.let {
+                    call.respondBytes(ContentType.Image.PNG) { it }
+                    return at get
+                }
+            }
             try {
                 val artworkMrl = call.request.queryParameters["artwork"] ?: RemoteAccessServer.getInstance(appContext).service?.coverArt
 



More information about the Android mailing list