合并上游更改
感谢:@821938089、@zhongerxll、@youke2580c、@Leroy-X、@Dark-Tide、@lhjgege、@3harmony、@mgz0227
This commit is contained in:
87 files changed
+800
-365
No files matched your search
@@ -5,6 +5,7 @@ import androidx.room.Delete
|
||||
import androidx.room.Insert
|
||||
import androidx.room.OnConflictStrategy
|
||||
import androidx.room.Query
|
||||
import androidx.room.Transaction
|
||||
import androidx.room.Update
|
||||
import io.legato.kazusa.constant.BookType
|
||||
import io.legato.kazusa.data.entities.Book
|
||||
@@ -150,6 +151,12 @@ interface BookDao {
|
||||
@Delete
|
||||
fun delete(vararg book: Book)
|
||||
|
||||
@Transaction
|
||||
fun replace(oldBook: Book, newBook: Book) {
|
||||
delete(oldBook)
|
||||
insert(newBook)
|
||||
}
|
||||
|
||||
@Query("update books set durChapterPos = :pos where bookUrl = :bookUrl")
|
||||
fun upProgress(bookUrl: String, pos: Int)
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import io.legato.kazusa.help.config.AppConfig
|
||||
import io.legato.kazusa.help.crypto.SymmetricCryptoAndroid
|
||||
import io.legato.kazusa.help.http.CookieStore
|
||||
import io.legato.kazusa.help.source.getShareScope
|
||||
import io.legato.kazusa.model.Debug
|
||||
import io.legato.kazusa.utils.GSON
|
||||
import io.legato.kazusa.utils.GSONStrict
|
||||
import io.legato.kazusa.utils.fromJsonArray
|
||||
@@ -116,7 +115,7 @@ interface BaseSource : JsExtensions {
|
||||
GSONStrict.fromJsonObject<Map<String, String>>(json).getOrNull()?.let { map ->
|
||||
putAll(map)
|
||||
} ?: GSON.fromJsonObject<Map<String, String>>(json).getOrNull()?.let { map ->
|
||||
Debug.log("≡请求头规则 JSON 格式不规范,请改为规范格式")
|
||||
log("请求头规则 JSON 格式不规范,请改为规范格式")
|
||||
putAll(map)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in new issue
Block a user