Remove some legacy folder/file name lookup for download

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Secozzi 2024-07-11 22:29:43 +02:00
parent d07bd71678
commit 5419d987f8
No known key found for this signature in database
GPG key ID: 71E9C97D8DDC2662

View file

@ -165,21 +165,12 @@ class MangaDownloadProvider(
*/
fun getValidChapterDirNames(chapterName: String, chapterScanlator: String?): List<String> {
val chapterDirName = getChapterDirName(chapterName, chapterScanlator)
return buildList(4) {
return buildList(2) {
// Folder of images
add(chapterDirName)
// Archived chapters
add("$chapterDirName.cbz")
if (chapterScanlator.isNullOrBlank()) {
// Previously null scanlator fields were converted to "" due to a bug
add("_$chapterDirName")
add("_$chapterDirName.cbz")
} else {
// Legacy chapter directory name used in v0.9.2 and before
add(DiskUtil.buildValidFilename(chapterName))
}
}
}
}