[Android] Load slaves saved in db at playback

Geoffrey Métais git at videolan.org
Tue May 31 18:27:04 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 31 18:12:17 2016 +0200| [911cd4d18766b1ff7ceb1ec9c4ae6c569f83165c] | committer: Geoffrey Métais

Load slaves saved in db at playback

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 4a87f58..29d9433 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1719,6 +1719,14 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
                 }
             });
         }
+        VLCApplication.runBackground(new Runnable() {
+            @Override
+            public void run() {
+                final ArrayList<Media.Slave> list = MediaDatabase.getInstance().getSlaves(mw.getLocation());
+                for (Media.Slave slave : list)
+                    mMediaPlayer.addSlave(slave.type, Uri.parse(slave.uri));
+            }
+        });
 
         media.setEventListener(mMediaListener);
         mMediaPlayer.setMedia(media);



More information about the Android mailing list