[Android] Stop resuming videos when history is disabled

Duncan McNamara git at videolan.org
Tue Jan 30 15:10:29 UTC 2024


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Mon Jan 29 15:17:44 2024 +0100| [b8b1de04012624ea2e798d1535941344a131d5a8] | committer: Nicolas Pomepuy

Stop resuming videos when history is disabled

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

 application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 4 +++-
 1 file changed, 3 insertions(+), 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 7a5335845d..4c84b55aaf 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -494,7 +494,9 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             }
             val title = mw.getMetaLong(MediaWrapper.META_TITLE)
             if (title > 0) uri = "$uri#$title".toUri()
-            val start = if (forceRestart || videoResumeStatus == VideoResumeStatus.NEVER) 0L else getStartTime(mw)
+            val start = if (forceRestart
+                || videoResumeStatus == VideoResumeStatus.NEVER
+                || Settings.getInstance(AppContextProvider.appContext).getBoolean(PLAYBACK_HISTORY, true)) 0L else getStartTime(mw)
             if (isVideoPlaying) {
                 if (!forceResume && videoResumeStatus == VideoResumeStatus.ASK && start > 0) {
                     waitForConfirmation.postValue(WaitConfirmation(mw.title, index, flags))



More information about the Android mailing list