|
|
|
@ -3,6 +3,7 @@ package org.koitharu.kotatsu.core.backup
|
|
|
|
import org.json.JSONObject
|
|
|
|
import org.json.JSONObject
|
|
|
|
import org.koitharu.kotatsu.bookmarks.data.BookmarkEntity
|
|
|
|
import org.koitharu.kotatsu.bookmarks.data.BookmarkEntity
|
|
|
|
import org.koitharu.kotatsu.core.db.entity.MangaEntity
|
|
|
|
import org.koitharu.kotatsu.core.db.entity.MangaEntity
|
|
|
|
|
|
|
|
import org.koitharu.kotatsu.core.db.entity.MangaSourceEntity
|
|
|
|
import org.koitharu.kotatsu.core.db.entity.TagEntity
|
|
|
|
import org.koitharu.kotatsu.core.db.entity.TagEntity
|
|
|
|
import org.koitharu.kotatsu.favourites.data.FavouriteCategoryEntity
|
|
|
|
import org.koitharu.kotatsu.favourites.data.FavouriteCategoryEntity
|
|
|
|
import org.koitharu.kotatsu.favourites.data.FavouriteEntity
|
|
|
|
import org.koitharu.kotatsu.favourites.data.FavouriteEntity
|
|
|
|
@ -78,6 +79,12 @@ class JsonDeserializer(private val json: JSONObject) {
|
|
|
|
percent = json.getDouble("percent").toFloat(),
|
|
|
|
percent = json.getDouble("percent").toFloat(),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun toMangaSourceEntity() = MangaSourceEntity(
|
|
|
|
|
|
|
|
source = json.getString("source"),
|
|
|
|
|
|
|
|
isEnabled = json.getBoolean("enabled"),
|
|
|
|
|
|
|
|
sortKey = json.getInt("sort_key"),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
fun toMap(): Map<String, Any?> {
|
|
|
|
fun toMap(): Map<String, Any?> {
|
|
|
|
val map = mutableMapOf<String, Any?>()
|
|
|
|
val map = mutableMapOf<String, Any?>()
|
|
|
|
val keys = json.keys()
|
|
|
|
val keys = json.keys()
|
|
|
|
|