[Android] Do not restart media scan if running

Geoffrey Métais git at videolan.org
Tue Jun 21 15:10:53 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jun 21 13:13:04 2016 +0200| [ae6405bba1509ca66f7e795e1aa81d64f0ccbd65] | committer: Geoffrey Métais

Do not restart media scan if running

(cherry picked from commit e661f165adc693f4c8f52143b7e94cb33daf7309)

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 7c08863..3d2c157 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -165,7 +165,7 @@ public class MainActivity extends AudioPlayerContainerActivity implements Filter
         Permissions.checkReadStoragePermission(this, false);
 
         mMediaLibrary = MediaLibrary.getInstance();
-        if (mMediaLibrary.getMediaItems().isEmpty()) {
+        if (!mMediaLibrary.isWorking() && mMediaLibrary.getMediaItems().isEmpty()) {
             if (mSettings.getBoolean(PreferencesActivity.AUTO_RESCAN, true))
                 mMediaLibrary.scanMediaItems();
             else



More information about the Android mailing list