Make manga and chapter folder name searching case insensitive

This commit is contained in:
arkon 2021-04-23 08:44:12 -04:00 committed by Jays2Kings
parent f9a724ee7b
commit 4d2d41412a

View File

@ -73,7 +73,7 @@ class DownloadProvider(private val context: Context) {
*/ */
fun findMangaDir(manga: Manga, source: Source): UniFile? { fun findMangaDir(manga: Manga, source: Source): UniFile? {
val sourceDir = findSourceDir(source) val sourceDir = findSourceDir(source)
return sourceDir?.findFile(getMangaDirName(manga)) return sourceDir?.findFile(getMangaDirName(manga), true)
} }
/** /**
@ -85,7 +85,9 @@ class DownloadProvider(private val context: Context) {
*/ */
fun findChapterDir(chapter: Chapter, manga: Manga, source: Source): UniFile? { fun findChapterDir(chapter: Chapter, manga: Manga, source: Source): UniFile? {
val mangaDir = findMangaDir(manga, source) val mangaDir = findMangaDir(manga, source)
return getValidChapterDirNames(chapter).mapNotNull { mangaDir?.findFile(it) }.firstOrNull() return getValidChapterDirNames(chapter).asSequence()
.mapNotNull { mangaDir?.findFile(it, true) }
.firstOrNull()
} }
/** /**