[Android] Fix loading of last playlist

Geoffrey Métais git at videolan.org
Fri Dec 22 14:16:23 CET 2017


vlc-android | branch: 2.5.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 22 14:00:46 2017 +0100| [d68f3ae7ef555b31b05aa771efe3d15df7575d65] | committer: Geoffrey Métais

Fix loading of last playlist

Media were not correctly retrieved from medialibrary

(cherry picked from commit 251be4668ab356bb6f2783045ac4dca2f74af25e)

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 29b363b17..e5271fdb0 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1667,9 +1667,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
 
                 final List<MediaWrapper> playList = new ArrayList<>(locations.length);
                 for (String location : locations) {
-                    String mrl = Uri.decode(location);
-                    MediaWrapper mw = mMedialibrary.getMedia(mrl);
-                    if (mw == null) mw = new MediaWrapper(Uri.parse(mrl));
+                    final String mrl = Uri.decode(location);
+                    final MediaWrapper mw = mMedialibrary.findMedia(new MediaWrapper(Uri.parse(mrl)));
                     playList.add(mw);
                 }
                 // load playlist



More information about the Android mailing list