Commit 9dd19a60 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Reload library instead of force rescan

Fixes #932
parent 6238c48f
......@@ -36,7 +36,9 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.ObsoleteCoroutinesApi
import org.videolan.libvlc.util.AndroidUtil
import org.videolan.medialibrary.interfaces.AbstractMedialibrary
import org.videolan.vlc.*
import org.videolan.vlc.BuildConfig
import org.videolan.vlc.R
import org.videolan.vlc.StartActivity
import org.videolan.vlc.extensions.ExtensionManagerService
import org.videolan.vlc.extensions.ExtensionsManager
import org.videolan.vlc.gui.audio.AudioBrowserFragment
......@@ -49,6 +51,7 @@ import org.videolan.vlc.gui.video.VideoGridFragment
import org.videolan.vlc.interfaces.Filterable
import org.videolan.vlc.interfaces.IRefreshable
import org.videolan.vlc.media.MediaUtils
import org.videolan.vlc.reloadLibrary
import org.videolan.vlc.util.*
private const val TAG = "VLC/MainActivity"
......@@ -201,7 +204,7 @@ class MainActivity : ContentActivity(),
if (current != null && current is IRefreshable)
(current as IRefreshable).refresh()
else
this.rescan()
reloadLibrary()
}
}
......
......@@ -35,7 +35,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.ObsoleteCoroutinesApi
import org.videolan.medialibrary.interfaces.AbstractMedialibrary
import org.videolan.vlc.R
import org.videolan.vlc.VLCApplication
import org.videolan.vlc.gui.audio.AudioAlbumsSongsFragment
import org.videolan.vlc.gui.audio.AudioBrowserFragment
import org.videolan.vlc.gui.browser.StorageBrowserFragment
......@@ -43,7 +42,6 @@ import org.videolan.vlc.gui.helpers.UiTools
import org.videolan.vlc.gui.tv.TvUtil
import org.videolan.vlc.gui.video.VideoGridFragment
import org.videolan.vlc.reloadLibrary
import org.videolan.vlc.rescan
import org.videolan.vlc.util.AndroidDevices
import org.videolan.vlc.util.KEY_FOLDER
import org.videolan.vlc.util.RESULT_RESCAN
......@@ -107,7 +105,7 @@ class SecondaryActivity : ContentActivity() {
when (item.itemId) {
R.id.ml_menu_refresh -> {
val ml = AbstractMedialibrary.getInstance()
if (!ml.isWorking) this.rescan()
if (!ml.isWorking) reloadLibrary()
return true
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment