From 4d2d41412a86a96ece274a2a34e7c1d81db8f22b Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 23 Apr 2021 08:44:12 -0400 Subject: [PATCH] Make manga and chapter folder name searching case insensitive --- .../eu/kanade/tachiyomi/data/download/DownloadProvider.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt index fd3f67417f..9bb5007b62 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt @@ -73,7 +73,7 @@ class DownloadProvider(private val context: Context) { */ fun findMangaDir(manga: Manga, source: Source): UniFile? { 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? { val mangaDir = findMangaDir(manga, source) - return getValidChapterDirNames(chapter).mapNotNull { mangaDir?.findFile(it) }.firstOrNull() + return getValidChapterDirNames(chapter).asSequence() + .mapNotNull { mangaDir?.findFile(it, true) } + .firstOrNull() } /**