[Android] Save media meta only if we change media
Geoffrey Métais
git at videolan.org
Fri May 11 17:10:30 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 11 17:09:27 2018 +0200| [0c4a5dfc879a972d156694055bae6117d83d9b36] | committer: Geoffrey Métais
Save media meta only if we change media
> https://code.videolan.org/videolan/vlc-android/commit/0c4a5dfc879a972d156694055bae6117d83d9b36
---
vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index c4f7a5f37..181914e84 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -678,9 +678,11 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
MediaPlayer.Event.Paused -> medialibrary.resumeBackgroundOperations()
MediaPlayer.Event.EndReached -> {
- saveMediaMeta()
- if (isBenchmark) player.setPreviousStats()
- if (nextIndex == -1) savePosition(true)
+ if (currentIndex != nextIndex) {
+ saveMediaMeta()
+ if (isBenchmark) player.setPreviousStats()
+ if (nextIndex == -1) savePosition(true)
+ }
next()
}
MediaPlayer.Event.EncounteredError -> {
More information about the Android
mailing list