Dynamic sources support

This commit is contained in:
Koitharu
2024-06-29 07:56:18 +03:00
parent 77bb5c2fcd
commit 0d8820bcab
66 changed files with 307 additions and 224 deletions

View File

@@ -7,7 +7,7 @@ import org.koitharu.kotatsu.core.db.entity.TagEntity
import org.koitharu.kotatsu.favourites.data.FavouriteCategoryEntity
import org.koitharu.kotatsu.favourites.data.FavouriteEntity
import org.koitharu.kotatsu.history.data.HistoryEntity
import org.koitharu.kotatsu.parsers.model.MangaSource
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.parsers.model.MangaState
import org.koitharu.kotatsu.parsers.model.SortOrder
import java.util.concurrent.TimeUnit
@@ -42,7 +42,7 @@ class JsonSerializerTest {
largeCoverUrl = null,
state = MangaState.FINISHED.name,
author = "RERE",
source = MangaSource.DUMMY.name,
source = MangaParserSource.DUMMY.name,
)
val json = JsonSerializer(entity).toJson()
val result = JsonDeserializer(json).toMangaEntity()
@@ -55,7 +55,7 @@ class JsonSerializerTest {
id = 934023534,
title = "Adventure",
key = "adventure",
source = MangaSource.DUMMY.name,
source = MangaParserSource.DUMMY.name,
)
val json = JsonSerializer(entity).toJson()
val result = JsonDeserializer(json).toTagEntity()

View File

@@ -3,7 +3,7 @@ package org.koitharu.kotatsu.reader.domain
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import org.koitharu.kotatsu.parsers.model.MangaSource
import org.koitharu.kotatsu.parsers.model.MangaParserSource
import org.koitharu.kotatsu.reader.ui.pager.ReaderPage
import kotlin.random.Random
@@ -73,6 +73,6 @@ class ChapterPagesTest {
preview = null,
chapterId = chapterId,
index = Random.nextInt(),
source = MangaSource.DUMMY,
source = MangaParserSource.DUMMY,
)
}