[Android] Fix external media titles
Nicolas Pomepuy
git at videolan.org
Mon Feb 8 07:30:56 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Feb 5 12:59:05 2021 +0100| [32c5e0b9cd0224a0ef4fdf14cbd6a66a614c113d] | committer: Nicolas Pomepuy
Fix external media titles
Fixes #1434
> https://code.videolan.org/videolan/vlc-android/commit/32c5e0b9cd0224a0ef4fdf14cbd6a66a614c113d
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 1 +
1 file changed, 1 insertion(+)
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 7ef293e49..700ee3a5c 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -443,6 +443,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
val media = medialibrary.findMedia(currentMedia) ?: return at launch
if (media.id == 0L) return at launch
if (titleIdx > 0) media.setLongMeta(MediaWrapper.META_TITLE, titleIdx.toLong())
+ if (media.title != currentMedia.title) media.rename(currentMedia.title)
if (media.type == MediaWrapper.TYPE_VIDEO || canSwitchToVideo || media.isPodcast) {
var progress = time / length.toFloat()
if (progress > 0.95f || length - time < 10000) {
More information about the Android
mailing list