Fix external plugin communication
(cherry picked from commit 2214c20742)
This commit is contained in:
@@ -141,7 +141,7 @@ class ExternalPluginContentSource(
|
||||
@Blocking
|
||||
@WorkerThread
|
||||
fun getPageUrl(url: String): String {
|
||||
val uri = "content://${source.authority}/pages/0".toUri().buildUpon()
|
||||
val uri = "content://${source.authority}/manga/pages/0".toUri().buildUpon()
|
||||
.appendQueryParameter("url", url)
|
||||
.build()
|
||||
return contentResolver.query(uri, null, null, null, null)
|
||||
|
||||
@@ -10,12 +10,11 @@ import android.provider.OpenableColumns
|
||||
import androidx.core.database.getStringOrNull
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runInterruptible
|
||||
import okhttp3.internal.closeQuietly
|
||||
import org.jetbrains.annotations.Blocking
|
||||
import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.core.fs.FileSequence
|
||||
import java.io.BufferedReader
|
||||
import java.io.File
|
||||
import java.io.InputStream
|
||||
import java.nio.file.attribute.BasicFileAttributes
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
@@ -35,8 +34,8 @@ fun File.takeIfWriteable() = takeIf { it.exists() && it.canWrite() }
|
||||
fun File.isNotEmpty() = length() != 0L
|
||||
|
||||
@Blocking
|
||||
fun ZipFile.readText(entry: ZipEntry) = getInputStream(entry).bufferedReader().use {
|
||||
it.readText()
|
||||
fun ZipFile.readText(entry: ZipEntry) = getInputStream(entry).use { output ->
|
||||
output.bufferedReader().use(BufferedReader::readText)
|
||||
}
|
||||
|
||||
fun File.getStorageName(context: Context): String = runCatching {
|
||||
|
||||
Reference in New Issue
Block a user