Merge branch 'gedoor:master' into master
This commit is contained in:
commit
dea4fac8ee
6 files changed
+18
-13
No files matched your search
@@ -261,8 +261,11 @@ object WebBook {
|
||||
Debug.log(bookSource.bookSourceUrl, "⇒正文规则为空,使用章节链接:${bookChapter.url}")
|
||||
return bookChapter.url
|
||||
}
|
||||
//章节名为卷名时 且 章节url没获取到,返回空白
|
||||
if(bookChapter.isVolume && bookChapter.url == bookChapter.title) return ""
|
||||
if(bookChapter.isVolume && bookChapter.url == bookChapter.title) {
|
||||
//不返回空值,是为了过书源检测
|
||||
Debug.log(bookSource.bookSourceUrl, "⇒一级目录正文,使用章节标题:${bookChapter.title}")
|
||||
return bookChapter.title
|
||||
}
|
||||
return if (bookChapter.url == book.bookUrl && !book.tocHtml.isNullOrEmpty()) {
|
||||
BookContent.analyzeContent(
|
||||
scope = scope,
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.view.KeyEvent
|
||||
import io.legado.app.constant.AppLog
|
||||
import io.legado.app.constant.EventBus
|
||||
import io.legado.app.data.appDb
|
||||
import io.legado.app.help.AppConfig
|
||||
@@ -42,7 +41,6 @@ class MediaButtonReceiver : BroadcastReceiver() {
|
||||
val keycode: Int = keyEvent.keyCode
|
||||
val action: Int = keyEvent.action
|
||||
if (action == KeyEvent.ACTION_DOWN) {
|
||||
AppLog.put("mediaButton $action")
|
||||
when (keycode) {
|
||||
KeyEvent.KEYCODE_MEDIA_PREVIOUS -> {
|
||||
if (context.getPrefBoolean("mediaButtonPerNext", false)) {
|
||||
@@ -88,7 +86,6 @@ class MediaButtonReceiver : BroadcastReceiver() {
|
||||
LifecycleHelp.isExistActivity(AudioPlayActivity::class.java) ->
|
||||
postEvent(EventBus.MEDIA_BUTTON, true)
|
||||
else -> if (AppConfig.mediaButtonOnExit || LifecycleHelp.activitySize() > 0 || !isMediaKey) {
|
||||
AppLog.put("readAloud start Service")
|
||||
if (ReadBook.book != null) {
|
||||
ReadBook.readAloud()
|
||||
} else {
|
||||
|
||||