mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-22 12:13:34 -05:00
add trackers support (#720)
* add trackers support * Cleanup Tracker Code * Add GraphQL support for Tracking * Fix lint and deprecation errors * remove password from logs * Fixes after merge * Disable tracking for now * More disabled --------- Co-authored-by: Syer10 <syer10@users.noreply.github.com>
This commit is contained in:
@@ -42,6 +42,7 @@ data class MangaDataClass(
|
||||
var lastChapterRead: ChapterDataClass? = null,
|
||||
val age: Long? = if (lastFetchedAt == null) 0 else Instant.now().epochSecond.minus(lastFetchedAt),
|
||||
val chaptersAge: Long? = if (chaptersLastFetchedAt == null) null else Instant.now().epochSecond.minus(chaptersLastFetchedAt),
|
||||
val trackers: List<MangaTrackerDataClass>? = null,
|
||||
)
|
||||
|
||||
data class PagedMangaListDataClass(
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package suwayomi.tachidesk.manga.model.dataclass
|
||||
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
data class MangaTrackerDataClass(
|
||||
val id: Int,
|
||||
val name: String,
|
||||
val icon: String,
|
||||
val statusList: List<Int>,
|
||||
val statusTextMap: Map<Int, String>,
|
||||
val scoreList: List<String>,
|
||||
val record: TrackRecordDataClass?,
|
||||
)
|
||||
@@ -0,0 +1,25 @@
|
||||
package suwayomi.tachidesk.manga.model.dataclass
|
||||
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
data class TrackRecordDataClass(
|
||||
val id: Int,
|
||||
val mangaId: Int,
|
||||
val syncId: Int,
|
||||
val remoteId: Long,
|
||||
val libraryId: Long?,
|
||||
val title: String,
|
||||
val lastChapterRead: Double,
|
||||
val totalChapters: Int,
|
||||
val status: Int,
|
||||
val score: Double,
|
||||
var scoreString: String? = null,
|
||||
val remoteUrl: String,
|
||||
val startDate: Long,
|
||||
val finishDate: Long,
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
package suwayomi.tachidesk.manga.model.dataclass
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@Serializable
|
||||
data class TrackSearchDataClass(
|
||||
val syncId: Int,
|
||||
val mediaId: Long,
|
||||
val title: String,
|
||||
val totalChapters: Int,
|
||||
val trackingUrl: String,
|
||||
val coverUrl: String,
|
||||
val summary: String,
|
||||
val publishingStatus: String,
|
||||
val publishingType: String,
|
||||
val startDate: String,
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
package suwayomi.tachidesk.manga.model.dataclass
|
||||
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
data class TrackerDataClass(
|
||||
val id: Int,
|
||||
val name: String,
|
||||
val icon: String,
|
||||
val isLogin: Boolean,
|
||||
val authUrl: String?,
|
||||
)
|
||||
Reference in New Issue
Block a user