fix #774, avoid showing Excluded images at Show All Folders Content

This commit is contained in:
tibbi 2018-05-23 13:52:09 +02:00
parent 49e376e2ec
commit 41ab8d4d6b
2 changed files with 11 additions and 1 deletions

View file

@ -292,6 +292,16 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
filteredMedia = media.filter { !it.path.contains("/.") } as ArrayList<Medium> filteredMedia = media.filter { !it.path.contains("/.") } as ArrayList<Medium>
} }
if (path == "/") {
val excludedFolders = config.excludedFolders
filteredMedia = filteredMedia.filter {
val mediumPath = it.path
excludedFolders.none {
mediumPath.startsWith(it, true)
}
} as ArrayList<Medium>
}
val filterMedia = config.filterMedia val filterMedia = config.filterMedia
filteredMedia = (when { filteredMedia = (when {
getVideosOnly -> filteredMedia.filter { it.type == TYPE_VIDEOS } getVideosOnly -> filteredMedia.filter { it.type == TYPE_VIDEOS }

View file

@ -24,7 +24,7 @@ data class Directory(
companion object { companion object {
private const val serialVersionUID = -6553345863555455L private const val serialVersionUID = -6553345863555455L
var sorting: Int = 0 var sorting = 0
} }
override fun compareTo(other: Directory): Int { override fun compareTo(other: Directory): Int {