[Android] Fix loading of last playlist
Geoffrey Métais
git at videolan.org
Tue Jan 16 17:45:07 CET 2018
vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 22 14:00:46 2017 +0100| [251be4668ab356bb6f2783045ac4dca2f74af25e] | committer: Geoffrey Métais
Fix loading of last playlist
Media were not correctly retrieved from medialibrary
> https://code.videolan.org/videolan/vlc-android/commit/251be4668ab356bb6f2783045ac4dca2f74af25e
---
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 5a45f7169..5c0727e36 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1646,9 +1646,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