|
|
@ -84,8 +84,8 @@ class WebBook(val bookSource: BookSource) { |
|
|
|
scope: CoroutineScope = Coroutine.DEFAULT, |
|
|
|
scope: CoroutineScope = Coroutine.DEFAULT, |
|
|
|
context: CoroutineContext = Dispatchers.IO |
|
|
|
context: CoroutineContext = Dispatchers.IO |
|
|
|
): Coroutine<Book> { |
|
|
|
): Coroutine<Book> { |
|
|
|
book.type = bookSource.bookSourceType |
|
|
|
|
|
|
|
return Coroutine.async(scope, context) { |
|
|
|
return Coroutine.async(scope, context) { |
|
|
|
|
|
|
|
book.type = bookSource.bookSourceType |
|
|
|
val body = |
|
|
|
val body = |
|
|
|
if (!book.infoHtml.isNullOrEmpty()) { |
|
|
|
if (!book.infoHtml.isNullOrEmpty()) { |
|
|
|
book.infoHtml |
|
|
|
book.infoHtml |
|
|
@ -111,8 +111,8 @@ class WebBook(val bookSource: BookSource) { |
|
|
|
scope: CoroutineScope = Coroutine.DEFAULT, |
|
|
|
scope: CoroutineScope = Coroutine.DEFAULT, |
|
|
|
context: CoroutineContext = Dispatchers.IO |
|
|
|
context: CoroutineContext = Dispatchers.IO |
|
|
|
): Coroutine<List<BookChapter>> { |
|
|
|
): Coroutine<List<BookChapter>> { |
|
|
|
book.type = bookSource.bookSourceType |
|
|
|
|
|
|
|
return Coroutine.async(scope, context) { |
|
|
|
return Coroutine.async(scope, context) { |
|
|
|
|
|
|
|
book.type = bookSource.bookSourceType |
|
|
|
val body = |
|
|
|
val body = |
|
|
|
if (book.bookUrl == book.tocUrl && !book.tocHtml.isNullOrEmpty()) { |
|
|
|
if (book.bookUrl == book.tocUrl && !book.tocHtml.isNullOrEmpty()) { |
|
|
|
book.tocHtml |
|
|
|
book.tocHtml |
|
|
|