mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(LocalSource): Local entry cover won't load
This commit is contained in:
parent
2393ddf9ce
commit
a98ba32b43
2 changed files with 21 additions and 4 deletions
|
@ -54,7 +54,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
|
|||
}
|
||||
}
|
||||
|
||||
fun updateCover(manga: SManga, input: InputStream): UniFile? {
|
||||
fun updateCover(manga: SManga, input: InputStream): UniFile {
|
||||
val dir = getBaseDirectory()
|
||||
var cover = getCoverFile(dir.findFile(manga.url))
|
||||
if (cover == null) {
|
||||
|
@ -67,7 +67,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
|
|||
input.copyTo(it)
|
||||
}
|
||||
}
|
||||
manga.thumbnail_url = cover.filePath
|
||||
manga.thumbnail_url = cover.uri.toString()
|
||||
return cover
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
|
|||
// Try to find the cover
|
||||
val cover = getCoverFile(mangaDir)
|
||||
if (cover != null && cover.exists()) {
|
||||
thumbnail_url = cover.filePath
|
||||
thumbnail_url = cover.uri.toString()
|
||||
}
|
||||
|
||||
val manga = this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue