Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
FooIbar committed Jun 25, 2024
1 parent cf6d41e commit bf936a8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package tachiyomi.source.local.io

import com.hippo.unifile.UniFile
import tachiyomi.core.common.storage.extension

object Archive {

private val SUPPORTED_ARCHIVE_TYPES = listOf("zip", "cbz", "rar", "cbr", "7z", "cb7", "tar", "cbt", "epub")

fun isSupported(file: UniFile): Boolean {
val name = file.name?.lowercase() ?: return false
val extension = name.substringAfterLast('.')
val nameWithoutExtension = name.substringBeforeLast('.')
return extension in SUPPORTED_ARCHIVE_TYPES
return file.extension?.lowercase() in SUPPORTED_ARCHIVE_TYPES
}
}

0 comments on commit bf936a8

Please sign in to comment.