|
|
|
@ -13,6 +13,7 @@ import io.legado.app.utils.StringUtils.wordCountFormat |
|
|
|
|
import kotlinx.coroutines.CoroutineScope |
|
|
|
|
import kotlinx.coroutines.ensureActive |
|
|
|
|
import splitties.init.appCtx |
|
|
|
|
import timber.log.Timber |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取详情 |
|
|
|
@ -86,6 +87,7 @@ object BookInfo { |
|
|
|
|
} ?: Debug.log(bookSource.bookSourceUrl, "└") |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${e.localizedMessage}") |
|
|
|
|
Timber.e(e, "获取分类出错") |
|
|
|
|
} |
|
|
|
|
scope.ensureActive() |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取字数") |
|
|
|
@ -96,6 +98,7 @@ object BookInfo { |
|
|
|
|
} |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${e.localizedMessage}") |
|
|
|
|
Timber.e(e, "获取字数出错") |
|
|
|
|
} |
|
|
|
|
scope.ensureActive() |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取最新章节") |
|
|
|
@ -106,6 +109,7 @@ object BookInfo { |
|
|
|
|
} |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${e.localizedMessage}") |
|
|
|
|
Timber.e(e, "获取最新章节出错") |
|
|
|
|
} |
|
|
|
|
scope.ensureActive() |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取简介") |
|
|
|
@ -116,6 +120,7 @@ object BookInfo { |
|
|
|
|
} |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${e.localizedMessage}") |
|
|
|
|
Timber.e(e, "获取简介出错") |
|
|
|
|
} |
|
|
|
|
scope.ensureActive() |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取封面链接") |
|
|
|
@ -126,6 +131,7 @@ object BookInfo { |
|
|
|
|
} |
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${e.localizedMessage}") |
|
|
|
|
Timber.e(e, "获取封面出错") |
|
|
|
|
} |
|
|
|
|
scope.ensureActive() |
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取目录链接") |
|
|
|
|