mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Handle file names with multiple ".cbz" occurrences properly
Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
parent
ad3e947432
commit
749c9e4fb5
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ class DownloadCache(
|
|||
|
||||
val mangaDirs = sourceDir.dir.listFiles().orEmpty().mapNotNull { mangaDir ->
|
||||
val name = mangaDir.name ?: return@mapNotNull null
|
||||
val chapterDirs = mangaDir.listFiles().orEmpty().mapNotNull { chapterFile -> chapterFile.name?.replace(".cbz", "") }.toHashSet()
|
||||
val chapterDirs = mangaDir.listFiles().orEmpty().mapNotNull { chapterFile -> chapterFile.name?.substringBeforeLast(".cbz") }.toHashSet()
|
||||
name to MangaDirectory(mangaDir, chapterDirs)
|
||||
}.toMap()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue