[Android] Systematic rescan, if enabled, on TV

Geoffrey Métais git at videolan.org
Mon Feb 15 10:42:53 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 15 10:41:39 2016 +0100| [d60e5fa2a5c37b54daec9c0eff6f74ed8d762967] | committer: Geoffrey Métais

Systematic rescan, if enabled, on TV

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

 vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index 1978e9c..3246722 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -115,8 +115,9 @@ public class MainTvActivity extends BaseTvActivity implements IVideoBrowser, OnI
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        if (mMediaLibrary.getMediaItems().isEmpty()) {
-            if (mSettings.getBoolean(PreferencesActivity.AUTO_RESCAN, true))
+        boolean rescan = mSettings.getBoolean(PreferencesActivity.AUTO_RESCAN, true);
+        if (rescan || mMediaLibrary.getMediaItems().isEmpty()) {
+            if (rescan)
                 mMediaLibrary.scanMediaItems(false);
             else
                 mMediaLibrary.loadMediaItems();



More information about the Android mailing list