mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-15 11:38:56 +01:00
use tempFileManager
This commit is contained in:
parent
c1466ada2b
commit
db3c53da3d
@ -98,7 +98,7 @@ class ChapterLoader(
|
|||||||
when (format) {
|
when (format) {
|
||||||
is Format.Directory -> DirectoryPageLoader(format.file)
|
is Format.Directory -> DirectoryPageLoader(format.file)
|
||||||
is Format.Zip -> ZipPageLoader(tempFileManager.createTempFile(format.file))
|
is Format.Zip -> ZipPageLoader(tempFileManager.createTempFile(format.file))
|
||||||
is Format.SevenZip -> SevenZipPageLoader(format.file.toTempFile(context))
|
is Format.SevenZip -> SevenZipPageLoader(tempFileManager.createTempFile(format.file))
|
||||||
is Format.Rar -> try {
|
is Format.Rar -> try {
|
||||||
RarPageLoader(tempFileManager.createTempFile(format.file))
|
RarPageLoader(tempFileManager.createTempFile(format.file))
|
||||||
} catch (e: UnsupportedRarV5Exception) {
|
} catch (e: UnsupportedRarV5Exception) {
|
||||||
|
@ -343,7 +343,7 @@ actual class LocalSource(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is Format.SevenZip -> {
|
is Format.SevenZip -> {
|
||||||
SevenZFile(format.file.toTempFile(context)).use { archive ->
|
SevenZFile(tempFileManager.createTempFile(format.file)).use { archive ->
|
||||||
val entry = archive.getImages().firstOrNull()
|
val entry = archive.getImages().firstOrNull()
|
||||||
|
|
||||||
entry?.let { coverManager.update(manga, it.inputStream()) }
|
entry?.let { coverManager.update(manga, it.inputStream()) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user