[Android] Add external media to history
Geoffrey Métais
git at videolan.org
Tue Feb 28 12:09:21 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb 28 12:07:00 2017 +0100| [1dfea783a0df98cffa1a7ff87447a5c48891a0ee] | committer: Geoffrey Métais
Add external media to history
> https://code.videolan.org/videolan/vlc-android/commit/1dfea783a0df98cffa1a7ff87447a5c48891a0ee
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index dff70a9..ca2507b 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1908,6 +1908,11 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
MediaWrapper media = mMedialibrary.findMedia(mw);
if (media != null)
id = media.getId();
+ else {
+ media = mMedialibrary.addMedia(mw.getUri().toString());
+ if (media != null)
+ id = media.getId();
+ }
}
mMedialibrary.increasePlayCount(id);
}
More information about the Android
mailing list