Fixed avif/encrypted thumbnails not loading (#966)
* Fixed avif/encrypted thumbnails not loading * used new input stream instead of byteArray
This commit is contained in:
parent
bfe824af18
commit
d502ebc275
@ -62,12 +62,14 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun isApplicable(source: BufferedSource): Boolean {
|
private fun isApplicable(source: BufferedSource): Boolean {
|
||||||
// SY -->
|
val type = source.peek().inputStream().buffered().use { stream ->
|
||||||
val type = source.peek().inputStream().buffered().use {
|
ImageUtil.findImageType(stream)
|
||||||
if (CbzCrypto.detectCoverImageArchive(it)) return true
|
|
||||||
// SY <--
|
|
||||||
ImageUtil.findImageType(it)
|
|
||||||
}
|
}
|
||||||
|
// SY -->
|
||||||
|
source.peek().inputStream().use { stream ->
|
||||||
|
if (CbzCrypto.detectCoverImageArchive(stream)) return true
|
||||||
|
}
|
||||||
|
// SY <--
|
||||||
return when (type) {
|
return when (type) {
|
||||||
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
|
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
|
||||||
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
||||||
|
Loading…
x
Reference in New Issue
Block a user