mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化tts导入
This commit is contained in:
@@ -31,6 +31,9 @@ class OnLineImportActivity :
|
||||
"replaceRule" -> showDialogFragment(
|
||||
ImportReplaceRuleDialog(it.second, true)
|
||||
)
|
||||
"httpTts" -> showDialogFragment(
|
||||
ImportHttpTtsDialog(it.second, true)
|
||||
)
|
||||
}
|
||||
}
|
||||
viewModel.errorLive.observe(this) {
|
||||
|
||||
@@ -88,7 +88,7 @@ class OnLineImportViewModel(app: Application) : BaseAssociationViewModel(app) {
|
||||
json.contains("name") && json.contains("rule") ->
|
||||
importTextTocRule(json, finally)
|
||||
json.contains("name") && json.contains("url") ->
|
||||
importHttpTTS(json, finally)
|
||||
successLive.postValue(Pair("httpTts", json))
|
||||
else -> errorLive.postValue("格式不对")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user