[Android] Prevent loading AB repeat and playback speed metadata when history is off
Nicolas Pomepuy
git at videolan.org
Wed Mar 20 14:10:02 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Mar 11 14:31:57 2024 +0100| [17dfc80a086712079909d5b494ccc7e20e0c5d14] | committer: Duncan McNamara
Prevent loading AB repeat and playback speed metadata when history is off
> https://code.videolan.org/videolan/vlc-android/commit/17dfc80a086712079909d5b494ccc7e20e0c5d14
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 4 ++--
1 file changed, 2 insertions(+), 2 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 3c6f9290bd..9a5e56d7a2 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -687,7 +687,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
} else if (settings.getBoolean("save_individual_audio_delay", true)) {
player.setAudioDelay(savedDelay)
}
- val abStart = media.getMetaLong(MediaWrapper.META_AB_REPEAT_START)
+ val abStart = if (settings.getBoolean(PLAYBACK_HISTORY, true)) media.getMetaLong(MediaWrapper.META_AB_REPEAT_START) else 0L
if (abStart != 0L) {
abRepeatOn.value = true
val abStop = media.getMetaLong(MediaWrapper.META_AB_REPEAT_STOP)
@@ -695,7 +695,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
player.setSpuTrack(media.getMetaLong(MediaWrapper.META_SUBTITLE_TRACK).toString())
player.setSpuDelay(media.getMetaLong(MediaWrapper.META_SUBTITLE_DELAY))
- val rateString = media.getMetaString(MediaWrapper.META_SPEED)
+ val rateString = if (settings.getBoolean(PLAYBACK_HISTORY, true)) media.getMetaString(MediaWrapper.META_SPEED) else null
if (!rateString.isNullOrEmpty()) {
player.setRate(rateString.toFloat(), false)
}
More information about the Android
mailing list