diff --git a/buildSrc/src/main/kotlin/Constants.kt b/buildSrc/src/main/kotlin/Constants.kt index c8ff9f16..33ff97a6 100644 --- a/buildSrc/src/main/kotlin/Constants.kt +++ b/buildSrc/src/main/kotlin/Constants.kt @@ -14,7 +14,7 @@ const val MainClass = "suwayomi.tachidesk.MainKt" // should be bumped with each stable release val tachideskVersion = System.getenv("ProductVersion") ?: "v0.5.1" -val webUIRevisionTag = System.getenv("WebUIRevision") ?: "r803" +val webUIRevisionTag = System.getenv("WebUIRevision") ?: "r804" // counts commits on the master branch val tachideskRevision = runCatching { diff --git a/server/src/main/kotlin/eu/kanade/tachiyomi/source/local/LocalSource.kt b/server/src/main/kotlin/eu/kanade/tachiyomi/source/local/LocalSource.kt index 74f48dbc..05d11169 100644 --- a/server/src/main/kotlin/eu/kanade/tachiyomi/source/local/LocalSource.kt +++ b/server/src/main/kotlin/eu/kanade/tachiyomi/source/local/LocalSource.kt @@ -2,6 +2,8 @@ package eu.kanade.tachiyomi.source.local import com.github.junrar.Archive import eu.kanade.tachiyomi.source.local.FileSystemInterceptor.fakeUrlFrom +import eu.kanade.tachiyomi.source.local.Format.Directory +import eu.kanade.tachiyomi.source.local.Format.Zip import eu.kanade.tachiyomi.source.local.LocalSource.Format.Directory import eu.kanade.tachiyomi.source.local.LocalSource.Format.Epub import eu.kanade.tachiyomi.source.local.LocalSource.Format.Rar @@ -342,18 +344,14 @@ class LocalSource : HttpSource() { throw Exception("Chapter not found") } - private fun getFormat(file: File): Format { - return with(file) { - when { - isDirectory -> Format.Directory(file) - extension.equals("zip", true) -> Format.Zip(file) - extension.equals("cbz", true) -> Format.Zip(file) - extension.equals("rar", true) -> Format.Rar(file) - extension.equals("cbr", true) -> Format.Rar(file) - extension.equals("epub", true) -> Format.Epub(file) + private fun getFormat(file: File): Format = with(file) { + when { + isDirectory -> Format.Directory(this) + extension.equals("zip", true) || extension.equals("cbz", true) -> Format.Zip(this) + extension.equals("rar", true) || extension.equals("cbr", true) -> Format.Rar(this) + extension.equals("epub", true) -> Format.Epub(this) else -> throw Exception("Invalid chapter format") - } } }