|
|
@ -141,14 +141,7 @@ object BookWebDav { |
|
|
|
fun uploadBookProgress(book: Book) { |
|
|
|
fun uploadBookProgress(book: Book) { |
|
|
|
if (!NetworkUtils.isAvailable()) return |
|
|
|
if (!NetworkUtils.isAvailable()) return |
|
|
|
Coroutine.async { |
|
|
|
Coroutine.async { |
|
|
|
val bookProgress = BookProgress( |
|
|
|
val bookProgress = BookProgress(book) |
|
|
|
name = book.name, |
|
|
|
|
|
|
|
author = book.author, |
|
|
|
|
|
|
|
durChapterIndex = book.durChapterIndex, |
|
|
|
|
|
|
|
durChapterPos = book.durChapterPos, |
|
|
|
|
|
|
|
durChapterTime = book.durChapterTime, |
|
|
|
|
|
|
|
durChapterTitle = book.durChapterTitle |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
val json = GSON.toJson(bookProgress) |
|
|
|
val json = GSON.toJson(bookProgress) |
|
|
|
val url = getProgressUrl(book) |
|
|
|
val url = getProgressUrl(book) |
|
|
|
if (initWebDav()) { |
|
|
|
if (initWebDav()) { |
|
|
|