1
0
mirror of https://github.com/fumiama/copymanga.git synced 2026-06-12 11:40:27 +08:00

2.0.beta12

1. 更新API
This commit is contained in:
源文雨
2022-10-15 21:36:19 +08:00
parent 79c78959b4
commit 36852a52dd
11 changed files with 47 additions and 53 deletions

View File

@@ -45,6 +45,7 @@ object DownloadTools {
setRequestProperty("source", "copyApp")
setRequestProperty("webp", "1")
setRequestProperty("region", "0")
setRequestProperty("authorization", "Token")
setRequestProperty("platform", "3")
ua?.let { setRequestProperty("User-agent", it) }

View File

@@ -304,11 +304,11 @@ class BookHandler(that: WeakReference<BookFragment>, private val path: String)
do {
counts[i] = counts[i] - 100
CMApi.getApiUrl(R.string.groupInfoApiUrl, path, gpw, offset)?.let {
Log.d("MyBFH", "get api: $it")
if(ComicDlFragment.exit) return
val ad = AutoDownloadThread(it) { result ->
Log.d("MyBFH", "${i}卷返回")
val r =
Gson().fromJson(result?.decodeToString(), VolumeStructure::class.java)
val r = Gson().fromJson(result?.decodeToString(), VolumeStructure::class.java)
re[r.results.offset / 100] = r
}
ads += ad

View File

@@ -16,7 +16,7 @@ import java.lang.Thread.sleep
@ExperimentalStdlibApi
class SortFragment : InfoCardLoader(R.layout.fragment_sort, R.id.action_nav_sort_to_nav_book) {
private val sortWay = listOf("datetime_updated", "-datetime_updated", "popular", "-popular")
private val sortWay = listOf("-datetime_updated", "datetime_updated", "popular", "-popular")
private var theme = -1
private var sortValue = 0
private var filter: FilterStructure? = null

View File

@@ -71,7 +71,10 @@ class ViewMangaActivity : TitleActivityTemplate() {
set(value) = setPageNumber(value)
//var pn = 0
private val isPnValid: Boolean get(){
if(pn == -2) pn = realCount
if(pn == -2) {
pn = 0
return true
}
return intent.getStringExtra("function") == "log" && pn > 0
}
private var tasks: Array<FutureTask<ByteArray?>?>? = null