[Android] Implement new playlist remote access API
Nicolas Pomepuy
git at videolan.org
Thu Jul 4 14:02:29 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Jun 28 12:12:34 2024 +0200| [b65522b32a55dc55e54c9966165a7776275afee6] | committer: Duncan McNamara
Implement new playlist remote access API
> https://code.videolan.org/videolan/vlc-android/commit/b65522b32a55dc55e54c9966165a7776275afee6
---
.../src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt b/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt
index 927d2ba054..ca7a042021 100644
--- a/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt
+++ b/application/webserver/src/main/java/org/videolan/vlc/webserver/RemoteAccessRouting.kt
@@ -553,7 +553,9 @@ fun Route.setupRouting(appContext: Context, scope: CoroutineScope) {
val list = ArrayList<RemoteAccessServer.PlayQueueItem>()
playlist.tracks.forEach { track ->
- list.add(track.toPlayQueueItem())
+ list.add(track.toPlayQueueItem().apply {
+ if (track.type == MediaWrapper.TYPE_VIDEO) fileType = "video"
+ })
}
val result= RemoteAccessServer.PlaylistResult(list, playlist.title)
val gson = Gson()
More information about the Android
mailing list