[Android] Avoid saving the chapter for videos as it's useless and harmful
Nicolas Pomepuy
git at videolan.org
Thu May 7 15:11:37 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May 7 15:04:19 2020 +0200| [a9b335b3bce791e003a71e81182342f0766c2da0] | committer: Nicolas Pomepuy
Avoid saving the chapter for videos as it's useless and harmful
Fixes #1326
> https://code.videolan.org/videolan/vlc-android/commit/a9b335b3bce791e003a71e81182342f0766c2da0
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 3 ---
1 file changed, 3 deletions(-)
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 a5479891d..aa11bd284 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -313,8 +313,6 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
val title = mw.getMetaLong(MediaWrapper.META_TITLE)
if (title > 0) uri = Uri.parse("$uri#$title")
- val chapter = mw.getMetaLong(MediaWrapper.META_CHAPTER)
- if (chapter > 0) uri = Uri.parse("$uri:$chapter")
val start = getStartTime(mw)
val media = mediaFactory.getFromUri(VLCInstance.get(service), uri)
media.addOption(":start-time=${start/1000L}")
@@ -431,7 +429,6 @@ 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 (chapterIdx > 0) media.setLongMeta(MediaWrapper.META_CHAPTER, chapterIdx.toLong())
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