[Android] Accept path parameter for RELOAD call

Geoffrey Métais git at videolan.org
Wed Apr 19 14:46:04 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 19 14:37:28 2017 +0200| [b1ca6e51a058540f323a5d6f9d0fc4fe280679da] | committer: Geoffrey Métais

Accept path parameter for RELOAD call

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

 vlc-android/src/org/videolan/vlc/MediaParsingService.java | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.java b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
index 7ff8679..71b39aa 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.java
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.java
@@ -115,7 +115,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
                 setupMedialibrary(intent.getBooleanExtra(StartActivity.EXTRA_UPGRADE, false));
                 break;
             case ACTION_RELOAD:
-                reload();
+                reload(intent.getStringExtra(EXTRA_PATH));
                 break;
             case ACTION_DISCOVER:
                 discover(intent.getStringExtra(EXTRA_PATH));
@@ -164,10 +164,13 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
         }
     }
 
-    private void reload() {
+    private void reload(String path) {
         if (mReload > 0)
             return;
-        mMedialibrary.reload();
+        if (TextUtils.isEmpty(path))
+            mMedialibrary.reload();
+        else
+            mMedialibrary.reload(path);
     }
 
     private void setupMedialibrary(final boolean upgrade) {
@@ -206,7 +209,7 @@ public class MediaParsingService extends Service implements DevicesDiscoveryCb {
                         if (upgrade) {
                             mMedialibrary.forceParserRetry();
                         } else if (!shouldInit)
-                            reload();
+                            reload(null);
                     }
                 }
             });



More information about the Android mailing list