move folder distinction check further
This commit is contained in:
parent
f38981be7b
commit
164518bb80
1 changed files with 3 additions and 2 deletions
|
@ -66,7 +66,8 @@ class MediaFetcher(val context: Context) {
|
||||||
val shouldShowHidden = config.shouldShowHidden
|
val shouldShowHidden = config.shouldShowHidden
|
||||||
val excludedPaths = config.excludedFolders
|
val excludedPaths = config.excludedFolders
|
||||||
val includedPaths = config.includedFolders
|
val includedPaths = config.includedFolders
|
||||||
folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden, context) }.toMutableList() as ArrayList<String>
|
folders.distinctBy { it.getDistinctPath() }
|
||||||
|
.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden, context) }.toMutableList() as ArrayList<String>
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
ArrayList()
|
ArrayList()
|
||||||
}
|
}
|
||||||
|
@ -190,7 +191,7 @@ class MediaFetcher(val context: Context) {
|
||||||
addFolder(foldersToScan, it)
|
addFolder(foldersToScan, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
return foldersToScan.distinctBy { it.getDistinctPath() }.toMutableSet() as LinkedHashSet<String>
|
return foldersToScan.toMutableSet() as LinkedHashSet<String>
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addFolder(curFolders: HashSet<String>, folder: String) {
|
private fun addFolder(curFolders: HashSet<String>, folder: String) {
|
||||||
|
|
Loading…
Reference in a new issue