[Android] Fix subs not loaded when restoring last playlist

Geoffrey Métais git at videolan.org
Mon Mar 30 11:20:19 CEST 2020


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 30 11:19:43 2020 +0200| [aa0499c8d31f0129b8c6310c9b357bc1f562b785] | committer: Geoffrey Métais

Fix subs not loaded when restoring last playlist

Fix #1083

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 5871b7392..124ce4c37 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -426,7 +426,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
     fun setSpuTrack(index: Int) {
         if (!player.setSpuTrack(index)) return
         val media = getCurrentMedia() ?: return
-        if (media.id != 0L) launch(Dispatchers.IO) { media.setLongMeta(AbstractMediaWrapper.META_SUBTITLE_TRACK, player.getSpuTrack().toLong()) }
+        if (media.id != 0L) launch(Dispatchers.IO) { media.setLongMeta(AbstractMediaWrapper.META_SUBTITLE_TRACK, index.toLong()) }
     }
 
     fun setAudioDelay(delay: Long) {



More information about the Android mailing list