[Android] Prevent useless metadata update for local files
Nicolas Pomepuy
git at videolan.org
Wed Aug 11 06:23:28 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Aug 10 15:23:42 2021 +0200| [1acbc54281c7db28e8a786ef60bb1404fd21f90a] | committer: Nicolas Pomepuy
Prevent useless metadata update for local files
Fixes #2129
> https://code.videolan.org/videolan/vlc-android/commit/1acbc54281c7db28e8a786ef60bb1404fd21f90a
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
1 file changed, 1 insertion(+), 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 943e3e14c..66f99a00f 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -911,7 +911,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
MediaPlayer.Event.ESSelected -> {
getCurrentMedia()?.let { media ->
- if (media.title != player.mediaplayer.media?.getMeta(IMedia.Meta.Title, true) || media.artist != player.mediaplayer.media?.getMeta(IMedia.Meta.Artist, true)) {
+ if (media.id < 1L && (media.title != player.mediaplayer.media?.getMeta(IMedia.Meta.Title, true) || media.artist != player.mediaplayer.media?.getMeta(IMedia.Meta.Artist, true))) {
media.updateMeta(player.mediaplayer)
service.onMediaListChanged()
service.showNotification()
More information about the Android
mailing list