filter folders for scanning from wrong folders

This commit is contained in:
tibbi 2018-12-01 11:05:46 +01:00
parent 05b5a4282e
commit 2764f205ee

View file

@ -122,7 +122,7 @@ class MediaFetcher(val context: Context) {
val foldersToIgnore = arrayListOf("/storage/emulated/legacy")
val config = context.config
val includedFolders = config.includedFolders
var foldersToScan = config.everShownFolders.toMutableList() as ArrayList
var foldersToScan = config.everShownFolders.filter { it == FAVORITES || it == RECYCLE_BIN || context.getDoesFilePathExist(it) }.toMutableList() as ArrayList
cursor.use {
if (cursor.moveToFirst()) {