pull/374/head
gedoor 4 years ago
parent f022856812
commit 340b509c72
  1. 2
      api.md
  2. 7
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt
  3. 4
      app/src/main/res/layout/item_download.xml
  4. 1
      app/src/main/res/values/strings.xml

@ -4,7 +4,7 @@
## 使用 ## 使用
### Web ### Web
以下说明假设您的操作在本机进行,且开放端口为1234。 以下说明假设您的操作在本机进行,且开放端口为1234。
如果您要从远程计算机访问[阅读],请将`127.0.0.1`替换成手机IP。 如果您要从远程计算机访问[阅读](),请将`127.0.0.1`替换成手机IP。
#### 插入单个书源 #### 插入单个书源
``` ```
URL = http://127.0.0.1:1234/saveSource URL = http://127.0.0.1:1234/saveSource

@ -192,10 +192,11 @@ class AnalyzeUrl(
option?.let { _ -> option?.let { _ ->
option.method?.let { if (it.equals("POST", true)) method = RequestMethod.POST } option.method?.let { if (it.equals("POST", true)) method = RequestMethod.POST }
option.headers?.let { headers -> option.headers?.let { headers ->
(headers as? Map<*, *>)?.forEach { key, value -> if (headers is Map<*, *>) {
headerMap[key.toString()] = value.toString() headers.forEach { entry ->
headerMap[entry.key.toString()] = entry.value.toString()
} }
if (headers is String) { } else if (headers is String) {
GSON.fromJsonObject<Map<String, String>>(headers) GSON.fromJsonObject<Map<String, String>>(headers)
?.let { headerMap.putAll(it) } ?.let { headerMap.putAll(it) }
} }

@ -38,12 +38,12 @@
android:layout_height="36dp" android:layout_height="36dp"
android:padding="6dp" android:padding="6dp"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:tint="@color/primaryText"
android:src="@drawable/ic_play_24dp" android:src="@drawable/ic_play_24dp"
android:contentDescription="@string/start" android:contentDescription="@string/start"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@+id/tv_export" /> app:layout_constraintRight_toLeftOf="@+id/tv_export"
app:tint="@color/primaryText" />
<TextView <TextView
android:id="@+id/tv_export" android:id="@+id/tv_export"

@ -290,7 +290,6 @@
<string name="padding_right">Padding right</string> <string name="padding_right">Padding right</string>
<string name="check_book_source">Check book sources</string> <string name="check_book_source">Check book sources</string>
<string name="check_select_source">Check the selected source</string> <string name="check_select_source">Check the selected source</string>
<string name="debug_select_source">Debug the selected source</string>
<string name="progress_show">Progress %1$d/%2$d</string> <string name="progress_show">Progress %1$d/%2$d</string>
<string name="tts_fix">Please install and select Chinese TTS!</string> <string name="tts_fix">Please install and select Chinese TTS!</string>
<string name="tts_init_failed">TTS initialization failed!</string> <string name="tts_init_failed">TTS initialization failed!</string>

Loading…
Cancel
Save