mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 01:29:02 +03:00
fix some cover related stuff
This commit is contained in:
parent
3ec6c52978
commit
b20f9bbae8
3 changed files with 7 additions and 5 deletions
|
@ -307,9 +307,11 @@ class LocalAnimeSource(private val context: Context) : AnimeCatalogueSource {
|
|||
}
|
||||
}
|
||||
is Format.Anime -> {
|
||||
if (!anime.thumbnail_url.isNullOrBlank()) {
|
||||
File(anime.thumbnail_url!!)
|
||||
} else null
|
||||
val entry = format.file.listFiles()
|
||||
?.sortedWith { f1, f2 -> f1.name.compareToCaseInsensitiveNaturalOrder(f2.name) }
|
||||
?.find { !it.isDirectory && ImageUtil.isImage(it.name) { FileInputStream(it) } }
|
||||
|
||||
entry?.let { updateCover(context, anime, it.inputStream()) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class AnimeSourceComfortableGridHolder(private val view: View, private val adapt
|
|||
if (it is CrossfadeTransition) it.durationMillis else 0
|
||||
}
|
||||
val request = ImageRequest.Builder(view.context)
|
||||
.data(anime.thumbnail_url)
|
||||
.data(anime)
|
||||
.setParameter(AnimeCoverFetcher.USE_CUSTOM_COVER, false)
|
||||
.target(StateImageViewTarget(binding.thumbnail, binding.progress, crossfadeDuration))
|
||||
.build()
|
||||
|
|
|
@ -57,7 +57,7 @@ open class AnimeSourceGridHolder(private val view: View, private val adapter: Fl
|
|||
if (it is CrossfadeTransition) it.durationMillis else 0
|
||||
}
|
||||
val request = ImageRequest.Builder(view.context)
|
||||
.data(anime.thumbnail_url)
|
||||
.data(anime)
|
||||
.setParameter(AnimeCoverFetcher.USE_CUSTOM_COVER, false)
|
||||
.target(StateImageViewTarget(binding.thumbnail, binding.progress, crossfadeDuration))
|
||||
.build()
|
||||
|
|
Loading…
Reference in a new issue