[Android] Restore playback speed even if history is off
Nicolas Pomepuy
git at videolan.org
Mon Mar 3 14:55:29 UTC 2025
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Mar 3 09:37:35 2025 +0100| [73c601511097ed121121e251c521cc67b4acbde4] | committer: Duncan McNamara
Restore playback speed even if history is off
Fixes #3161
> https://code.videolan.org/videolan/vlc-android/commit/73c601511097ed121121e251c521cc67b4acbde4
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 3 +--
1 file changed, 1 insertion(+), 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 f7fa2a7760..e6c56501fd 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -743,13 +743,12 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
*/
private fun restoreSpeed(media: MediaWrapper) {
val playbackRate = when {
- //history is off, restore nothing
- !settings.getBoolean(PLAYBACK_HISTORY, true) -> 1F
//restore all
settings.getBoolean(
if (player.isVideoPlaying()) KEY_PLAYBACK_SPEED_VIDEO_GLOBAL else KEY_PLAYBACK_SPEED_AUDIO_GLOBAL,
false
) -> settings.getFloat(if (player.isVideoPlaying()) KEY_PLAYBACK_SPEED_VIDEO_GLOBAL_VALUE else KEY_PLAYBACK_SPEED_AUDIO_GLOBAL_VALUE, 1.0f)
+ settings.getBoolean(KEY_INCOGNITO, false) -> 1F
//restore one
else -> try {
media.getMetaString(MediaWrapper.META_SPEED).toFloat()
More information about the Android
mailing list