mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-26 23:28:58 +03:00
Make manga and chapter folder name searching case insensitive
This commit is contained in:
parent
fa31369f99
commit
4cefbce7c3
1 changed files with 3 additions and 2 deletions
|
@ -76,7 +76,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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ class DownloadProvider(private val context: Context) {
|
|||
fun findChapterDir(chapter: Chapter, manga: Manga, source: Source): UniFile? {
|
||||
val mangaDir = findMangaDir(manga, source)
|
||||
return getValidChapterDirNames(chapter).asSequence()
|
||||
.mapNotNull { mangaDir?.findFile(it) }
|
||||
.mapNotNull { mangaDir?.findFile(it, true) }
|
||||
.firstOrNull()
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,7 @@ class DownloadProvider(private val context: Context) {
|
|||
return listOf(
|
||||
getChapterDirName(chapter),
|
||||
|
||||
// TODO: remove this
|
||||
// Legacy chapter directory name used in v0.9.2 and before
|
||||
DiskUtil.buildValidFilename(chapter.name)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue