Differ extra attempts to load local series' covers until chapter loading
This commit is contained in:
+7
-8
@@ -16,16 +16,15 @@ actual class LocalSourceFileSystem(
|
||||
}
|
||||
|
||||
actual fun getMangaDirectory(name: String): UniFile? {
|
||||
return getFilesInBaseDirectory()
|
||||
// Get the first mangaDir or null
|
||||
.firstOrNull { it.isDirectory && it.name == name }
|
||||
return getBaseDirectory()
|
||||
?.findFile(name, true)
|
||||
?.takeIf { it.isDirectory }
|
||||
}
|
||||
|
||||
actual fun getFilesInMangaDirectory(name: String): List<UniFile> {
|
||||
return getFilesInBaseDirectory()
|
||||
// Filter out ones that are not related to the manga and is not a directory
|
||||
.filter { it.isDirectory && it.name == name }
|
||||
// Get all the files inside the filtered folders
|
||||
.flatMap { it.listFiles().orEmpty().toList() }
|
||||
return getBaseDirectory()
|
||||
?.findFile(name, true)
|
||||
?.takeIf { it.isDirectory }
|
||||
?.listFiles().orEmpty().toList()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user