[Android] Fix the media title being set to the filename when resuming playback

Nicolas Pomepuy git at videolan.org
Tue Aug 2 15:28:16 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Aug  1 12:14:46 2022 +0200| [5eb501555700403523f42aeb9a73feef90bc6ac4] | committer: Duncan McNamara

Fix the media title being set to the filename when resuming playback

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index a703db68e..586912fab 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -983,7 +983,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
                         newMedia = false
                         if (player.hasRenderer || !player.isVideoPlaying()) showAudioPlayer.value = true
                         savePlaycount(mw)
-                        if (mw.type == MediaWrapper.TYPE_STREAM && (mw.title != player.mediaplayer.media?.getMeta(IMedia.Meta.Title, true) || mw.artist != player.mediaplayer.media?.getMeta(IMedia.Meta.Artist, true))) {
+                        if (mw.title == mw.fileName || (mw.type == MediaWrapper.TYPE_STREAM && (mw.title != player.mediaplayer.media?.getMeta(IMedia.Meta.Title, true) || mw.artist != player.mediaplayer.media?.getMeta(IMedia.Meta.Artist, true)))) {
                             // used for initial metadata update. We avoid the metadata load when the initial MediaPlayer.Event.ESSelected is sent to avoid race conditions
                             refreshTrackMeta(mw)
                         }



More information about the Android mailing list