Revert to extensions-lib 1.4.2

Better to just wait for 1.5 to do the RxJava migration changes together for all APIs.
This commit is contained in:
arkon 2023-09-08 22:47:27 -04:00
parent dd0bb1ccd6
commit dc237650ea
5 changed files with 20 additions and 18 deletions

View File

@ -9,7 +9,7 @@ gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.
gradle-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin_version" }
gradle-kotlinter = { module = "org.jmailen.gradle:kotlinter-gradle", version = "3.13.0" }
tachiyomi-lib = { module = "com.github.tachiyomiorg:extensions-lib", version = "1.4.3" }
tachiyomi-lib = { module = "com.github.tachiyomiorg:extensions-lib", version = "1.4.2" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin_version" }
kotlin-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization_version" }

View File

@ -6,7 +6,7 @@ ext {
extName = 'Cubari'
pkgNameSuffix = "all.cubari"
extClass = '.CubariFactory'
extVersionCode = 20
extVersionCode = 21
}
apply from: "$rootDir/common.gradle"

View File

@ -4,8 +4,8 @@ import android.app.Application
import android.os.Build
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservable
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.network.await
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
@ -84,10 +84,10 @@ open class Cubari(override val lang: String) : HttpSource() {
return parseMangaList(result, SortType.PINNED)
}
override suspend fun getMangaDetails(manga: SManga): SManga {
override fun fetchMangaDetails(manga: SManga): Observable<SManga> {
return client.newCall(chapterListRequest(manga))
.await()
.let { response -> mangaDetailsParse(response, manga) }
.asObservableSuccess()
.map { response -> mangaDetailsParse(response, manga) }
}
// Called when the series is loaded, or when opening in browser
@ -104,10 +104,10 @@ open class Cubari(override val lang: String) : HttpSource() {
return parseManga(result, manga)
}
override suspend fun getChapterList(manga: SManga): List<SChapter> {
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
return client.newCall(chapterListRequest(manga))
.await()
.let { response -> chapterListParse(response, manga) }
.asObservable()
.map { response -> chapterListParse(response, manga) }
}
// Gets the chapter list based on the series being viewed
@ -129,19 +129,19 @@ open class Cubari(override val lang: String) : HttpSource() {
return parseChapterList(res, manga)
}
override suspend fun getPageList(chapter: SChapter): List<Page> {
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
return when {
chapter.url.contains("/chapter/") -> {
client.newCall(pageListRequest(chapter))
.await()
.let { response ->
.asObservableSuccess()
.map { response ->
directPageListParse(response)
}
}
else -> {
client.newCall(pageListRequest(chapter))
.await()
.let { response ->
.asObservableSuccess()
.map { response ->
seriesJsonPageListParse(response, chapter)
}
}

View File

@ -6,7 +6,7 @@ ext {
extName = 'Komga'
pkgNameSuffix = 'all.komga'
extClass = '.KomgaFactory'
extVersionCode = 49
extVersionCode = 50
}
apply from: "$rootDir/common.gradle"

View File

@ -20,6 +20,7 @@ import eu.kanade.tachiyomi.extension.all.komga.dto.PageWrapperDto
import eu.kanade.tachiyomi.extension.all.komga.dto.ReadListDto
import eu.kanade.tachiyomi.extension.all.komga.dto.SeriesDto
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservable
import eu.kanade.tachiyomi.network.await
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.UnmeteredSource
@ -39,6 +40,7 @@ import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import rx.Observable
import rx.Single
import rx.schedulers.Schedulers
import uy.kohesive.injekt.Injekt
@ -179,10 +181,10 @@ open class Komga(private val suffix: String = "") : ConfigurableSource, Unmetere
override fun searchMangaParse(response: Response): MangasPage =
processSeriesPage(response)
override suspend fun getMangaDetails(manga: SManga): SManga {
override fun fetchMangaDetails(manga: SManga): Observable<SManga> {
return client.newCall(GET(manga.url, headers))
.await()
.let { response ->
.asObservable()
.map { response ->
mangaDetailsParse(response).apply { initialized = true }
}
}