[Android] Do not update in-memory 'seen' state

Geoffrey Métais git at videolan.org
Mon Jan 14 18:22:00 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 14 18:20:53 2019 +0100| [ad6f2518c964683b930c5d5d40942b52cf297af4] | committer: Geoffrey Métais

Do not update in-memory 'seen' state

This prevented the DiffUtil to see the state update from medialibrary

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index a3da039b4..3625ba2d7 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -415,7 +415,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
                 if (progress > 0.95f || length - time < 10000) {
                     //increase seen counter if more than 95% of the media have been seen
                     //and reset progress to 0
-                    launch(Dispatchers.IO) { media.setLongMeta(MediaWrapper.META_SEEN, ++media.seen) }
+                    launch(Dispatchers.IO) { media.setLongMeta(MediaWrapper.META_SEEN, media.seen+1) }
                     progress = 0f
                 }
                 media.time = if (progress == 0f) 0L else time



More information about the Android mailing list