[Android] Save available Slaves on playback

Geoffrey Métais git at videolan.org
Fri May 27 16:42:32 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 27 14:40:58 2016 +0200| [e341d2c67bf857a2c66eaa8d91c2ce13f6fb1611] | committer: Geoffrey Métais

Save available Slaves on playback

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 32c7a4d..b97f067 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -66,6 +66,7 @@ import org.videolan.libvlc.MediaList;
 import org.videolan.libvlc.MediaPlayer;
 import org.videolan.libvlc.util.AndroidUtil;
 import org.videolan.vlc.gui.AudioPlayerContainerActivity;
+import org.videolan.vlc.gui.browser.NetworkBrowserFragment;
 import org.videolan.vlc.gui.helpers.AudioUtil;
 import org.videolan.vlc.gui.preferences.PreferencesActivity;
 import org.videolan.vlc.gui.preferences.PreferencesFragment;
@@ -1711,6 +1712,12 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
         if (mw.getSlaves() != null) {
             for (Media.Slave slave : mw.getSlaves())
                 media.addSlave(slave);
+            VLCApplication.runBackground(new Runnable() {
+                @Override
+                public void run() {
+                    MediaDatabase.getInstance().saveSlaves(mw);
+                }
+            });
         }
 
         media.setEventListener(mMediaListener);



More information about the Android mailing list