1
0
mirror of https://github.com/fumiama/copymanga.git synced 2026-06-09 17:50:28 +08:00

Fix book load (#24)

* update gradle to 8.1.0

* fix book load

use http headers of the latest official app version

---------

Co-authored-by: linsui <linsui555@gmail.com>
This commit is contained in:
linsui
2023-09-02 11:47:04 +00:00
committed by GitHub
parent 43d27e68da
commit 306e69ff3a
12 changed files with 26 additions and 14 deletions

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="top.fumiama.dmzj.copymanga">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
@@ -47,4 +46,4 @@
android:theme="@style/AppTheme.NoActionBar"/>
</application>
</manifest>
</manifest>

View File

@@ -28,15 +28,17 @@ object DownloadTools {
setRequestProperty("region", if(!getBoolean("settings_cat_net_sw_use_foreign", false)) "1" else "0")
}
it.getPreferences(Context.MODE_PRIVATE).apply {
setRequestProperty("version", getString("app_ver", "1.4.4"))
setRequestProperty("version", getString("app_ver", "2.0.7"))
getString("token", "")?.let {
if(it != "") setRequestProperty("authorization", "Token $it")
else setRequestProperty("authorization", "Token")
else setRequestProperty("authorization", "Token ")
}
}
}
setRequestProperty("platform", "3")
}
Log.d("Mydl", "getHttp: ${connection.getRequestProperties().map({ "${it.key}: ${it.value}" }).joinToString("\n")}")
connection
}
private fun getNormalConnection(url: String?, method: String = "GET", ua: String? = null) =

View File

@@ -362,4 +362,4 @@ class BookHandler(private val th: WeakReference<BookFragment>, private val path:
}
vols = volumes
}
}
}

View File

@@ -61,8 +61,9 @@
<string name="TRANSPORT_LOWPAN">LOWPAN</string>
<string name="TRANSPORT_NULL">无网络</string>
<string name="pc_ua">Dart/2.16 (dart:io)</string>
<string name="app_ver">1.4.4</string>
<string name="pc_ua">COPY/2.0.7</string>
<string name="app_ver">2.0.7</string>
<string name="referer">com.copymanga.app-2.0.7</string>
<string name="menu_update_time">更新时间</string>
<string name="menu_hot">热度</string>