add only Portrait folders in subdirs at fetching media

This commit is contained in:
tibbi 2019-09-29 21:35:08 +02:00
parent 77f3c3adb6
commit 49ad4d812f
1 changed files with 4 additions and 2 deletions

View File

@ -207,7 +207,7 @@ class MediaFetcher(val context: Context) {
val checkFileExistence = config.fileLoadingPriority == PRIORITY_VALIDITY
val showHidden = config.shouldShowHidden
val dateTakens = if (getProperDateTaken && folder != FAVORITES && !isRecycleBin) getFolderDateTakens(folder) else HashMap()
val subdirs = ArrayList<File>()
val subdirs = ArrayList<File>() // used only for Portrait photos starting with "IMG_" for now
val files = when (folder) {
FAVORITES -> favoritePaths.filter { showHidden || !it.contains("/.") }.map { File(it) }.toMutableList() as ArrayList<File>
@ -217,7 +217,9 @@ class MediaFetcher(val context: Context) {
val notDirs = ArrayList<File>()
allFiles.forEach {
if (it.isDirectory) {
if (it.name.startsWith("img_", true)) {
subdirs.add(it)
}
} else {
notDirs.add(it)
}