mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
88d0ef2cfa
commit
290d84414e
@ -125,8 +125,8 @@ object ImportOldData {
|
||||
book.originName = jsonItem.readString("$.bookInfoBean.origin") ?: ""
|
||||
book.author = jsonItem.readString("$.bookInfoBean.author") ?: ""
|
||||
val local = if (book.origin == "loc_book") BookType.local else 0
|
||||
book.type = local or
|
||||
if (jsonItem.readString("$.bookInfoBean.bookSourceType") == "AUDIO") BookType.audio else BookType.text
|
||||
val isAudio = jsonItem.readString("$.bookInfoBean.bookSourceType") == "AUDIO"
|
||||
book.type = local or if (isAudio) BookType.audio else BookType.text
|
||||
book.tocUrl = jsonItem.readString("$.bookInfoBean.chapterUrl") ?: book.bookUrl
|
||||
book.coverUrl = jsonItem.readString("$.bookInfoBean.coverUrl")
|
||||
book.customCoverUrl = jsonItem.readString("$.customCoverPath")
|
||||
|
Loading…
Reference in New Issue
Block a user