优化
This commit is contained in:
1 parent
61ea301c2e
commit
278a7f6c0e
1 file changed
+2
-2
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user