mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-22 04:03:32 -05:00
* improve(#733): less databases calls on getChapterList with onlineFetch * improve(#733): fixes (delete with ids), tried batch update but not successfull * improve(#733): fixes (batch update) * improve(#733): clean imports * improve(#733): fixes SChapter to ChapterDataClass, * improve(#733): re-added recognize chap number --------- Co-authored-by: Alexandre JOURNET <alexandre.journet@axopen.com>
This commit is contained in:
committed by
GitHub
parent
9d2b098837
commit
6d33d72663
@@ -1,5 +1,7 @@
|
||||
package suwayomi.tachidesk.manga.model.dataclass
|
||||
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
@@ -38,4 +40,33 @@ data class ChapterDataClass(
|
||||
val chapterCount: Int? = null,
|
||||
/** used to store client specific values */
|
||||
val meta: Map<String, String> = emptyMap(),
|
||||
)
|
||||
) {
|
||||
companion object {
|
||||
fun fromSChapter(
|
||||
sChapter: SChapter,
|
||||
id: Int,
|
||||
index: Int,
|
||||
fetchedAt: Long,
|
||||
mangaId: Int,
|
||||
realUrl: String?,
|
||||
): ChapterDataClass {
|
||||
return ChapterDataClass(
|
||||
id = id,
|
||||
url = sChapter.url,
|
||||
name = sChapter.name,
|
||||
uploadDate = sChapter.date_upload,
|
||||
chapterNumber = sChapter.chapter_number,
|
||||
scanlator = sChapter.scanlator ?: "",
|
||||
index = index,
|
||||
fetchedAt = fetchedAt,
|
||||
realUrl = realUrl,
|
||||
mangaId = mangaId,
|
||||
read = false,
|
||||
bookmarked = false,
|
||||
lastPageRead = 0,
|
||||
lastReadAt = 0,
|
||||
downloaded = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user