diff --git a/app/src/main/assets/web/bookSource/index.html b/app/src/main/assets/web/bookSource/index.html index c3b6a4389..c67a810f7 100644 --- a/app/src/main/assets/web/bookSource/index.html +++ b/app/src/main/assets/web/bookSource/index.html @@ -25,7 +25,7 @@
源类型 :
+ placeholder="<必填>0:文本 1:音频 2:图片 3:文件(只提供下载的网站)">
源名称 :
diff --git a/app/src/main/java/io/legado/app/constant/BookType.kt b/app/src/main/java/io/legado/app/constant/BookType.kt index 848884275..13c21f4ae 100644 --- a/app/src/main/java/io/legado/app/constant/BookType.kt +++ b/app/src/main/java/io/legado/app/constant/BookType.kt @@ -5,7 +5,8 @@ import androidx.annotation.IntDef object BookType { const val default = 0 // 0 文本 const val audio = 1 // 1 音频 - const val image = 2 //图片 + const val image = 2 // 2 图片 + const val file = 3 // 3 只提供下载服务的网站 const val local = "loc_book" @Target(AnnotationTarget.VALUE_PARAMETER) diff --git a/app/src/main/java/io/legado/app/data/entities/BookSource.kt b/app/src/main/java/io/legado/app/data/entities/BookSource.kt index 2d1d164c7..228ba7915 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookSource.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookSource.kt @@ -27,7 +27,7 @@ data class BookSource( var bookSourceName: String = "", // 分组 var bookSourceGroup: String? = null, - // 类型,0 文本,1 音频, 2 图片 + // 类型,0 文本,1 音频, 2 图片, 3 文件(指的是类似知轩藏书只提供下载的网站) @BookType.Type var bookSourceType: Int = 0, // 详情页url正则 diff --git a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt index 9b58c9a44..3f647fa46 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditActivity.kt @@ -192,6 +192,7 @@ class BookSourceEditActivity : binding.cbIsEnableFind.isChecked = it.enabledExplore binding.spType.setSelection( when (it.bookSourceType) { + BookType.file -> 3 BookType.image -> 2 BookType.audio -> 1 else -> 0 @@ -296,6 +297,7 @@ class BookSourceEditActivity : source.enabled = binding.cbIsEnable.isChecked source.enabledExplore = binding.cbIsEnableFind.isChecked source.bookSourceType = when (binding.spType.selectedItemPosition) { + 3 -> BookType.file 2 -> BookType.image 1 -> BookType.audio else -> BookType.default diff --git a/app/src/main/res/values-es-rES/arrays.xml b/app/src/main/res/values-es-rES/arrays.xml index 345f6964a..fe92af603 100644 --- a/app/src/main/res/values-es-rES/arrays.xml +++ b/app/src/main/res/values-es-rES/arrays.xml @@ -4,6 +4,7 @@ Texto Audio Image + File diff --git a/app/src/main/res/values-pt-rBR/arrays.xml b/app/src/main/res/values-pt-rBR/arrays.xml index aaa9e60d6..4739b9d08 100644 --- a/app/src/main/res/values-pt-rBR/arrays.xml +++ b/app/src/main/res/values-pt-rBR/arrays.xml @@ -4,6 +4,7 @@ Texto Áudio Image + File diff --git a/app/src/main/res/values-zh-rHK/arrays.xml b/app/src/main/res/values-zh-rHK/arrays.xml index ca4ebc0fc..0eaf1a340 100644 --- a/app/src/main/res/values-zh-rHK/arrays.xml +++ b/app/src/main/res/values-zh-rHK/arrays.xml @@ -5,6 +5,7 @@ 文本 音頻 图片 + 文件 diff --git a/app/src/main/res/values-zh-rTW/arrays.xml b/app/src/main/res/values-zh-rTW/arrays.xml index 019b34be3..3487a326a 100644 --- a/app/src/main/res/values-zh-rTW/arrays.xml +++ b/app/src/main/res/values-zh-rTW/arrays.xml @@ -4,6 +4,7 @@ 文字 音訊 图片 + 文件 diff --git a/app/src/main/res/values-zh/arrays.xml b/app/src/main/res/values-zh/arrays.xml index 970ae369c..d44eceafb 100644 --- a/app/src/main/res/values-zh/arrays.xml +++ b/app/src/main/res/values-zh/arrays.xml @@ -4,6 +4,7 @@ 文本 音频 图片 + 文件 diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 8bc2d5232..47dd6b09a 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -4,6 +4,7 @@ Text Audio Image + File