mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 21:07:57 +01:00
Add interval data layer (#9398)
* Update Manga classes for fetch interval data * Update per review bump version --------- Co-authored-by: quangkieu <qkieu>
This commit is contained in:
@@ -4,13 +4,15 @@ import eu.kanade.tachiyomi.source.model.UpdateStrategy
|
||||
import tachiyomi.domain.library.model.LibraryManga
|
||||
import tachiyomi.domain.manga.model.Manga
|
||||
|
||||
val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy) -> Manga =
|
||||
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, _, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy ->
|
||||
val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Long, Boolean, Long, Long, Long, Long, UpdateStrategy) -> Manga =
|
||||
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, calculateInterval, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy ->
|
||||
Manga(
|
||||
id = id,
|
||||
source = source,
|
||||
favorite = favorite,
|
||||
lastUpdate = lastUpdate ?: 0,
|
||||
nextUpdate = nextUpdate ?: 0,
|
||||
calculateInterval = calculateInterval.toInt(),
|
||||
dateAdded = dateAdded,
|
||||
viewerFlags = viewerFlags,
|
||||
chapterFlags = chapterFlags,
|
||||
@@ -28,8 +30,8 @@ val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?,
|
||||
)
|
||||
}
|
||||
|
||||
val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long, Long, Long, Long, Long) -> LibraryManga =
|
||||
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy, totalCount, readCount, latestUpload, chapterFetchedAt, lastRead, bookmarkCount, category ->
|
||||
val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Long, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long, Long, Long, Long, Long) -> LibraryManga =
|
||||
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, calculateInterval, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy, totalCount, readCount, latestUpload, chapterFetchedAt, lastRead, bookmarkCount, category ->
|
||||
LibraryManga(
|
||||
manga = mangaMapper(
|
||||
id,
|
||||
@@ -45,6 +47,7 @@ val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?,
|
||||
favorite,
|
||||
lastUpdate,
|
||||
nextUpdate,
|
||||
calculateInterval,
|
||||
initialized,
|
||||
viewerFlags,
|
||||
chapterFlags,
|
||||
|
||||
@@ -87,7 +87,8 @@ class MangaRepositoryImpl(
|
||||
thumbnailUrl = manga.thumbnailUrl,
|
||||
favorite = manga.favorite,
|
||||
lastUpdate = manga.lastUpdate,
|
||||
nextUpdate = null,
|
||||
nextUpdate = manga.nextUpdate,
|
||||
calculateInterval = manga.calculateInterval.toLong(),
|
||||
initialized = manga.initialized,
|
||||
viewerFlags = manga.viewerFlags,
|
||||
chapterFlags = manga.chapterFlags,
|
||||
@@ -134,6 +135,8 @@ class MangaRepositoryImpl(
|
||||
thumbnailUrl = value.thumbnailUrl,
|
||||
favorite = value.favorite?.toLong(),
|
||||
lastUpdate = value.lastUpdate,
|
||||
nextUpdate = value.nextUpdate,
|
||||
calculateInterval = value.calculateInterval?.toLong(),
|
||||
initialized = value.initialized?.toLong(),
|
||||
viewer = value.viewerFlags,
|
||||
chapterFlags = value.chapterFlags,
|
||||
|
||||
Reference in New Issue
Block a user