2021-11-12 16:55:54 +00:00
|
|
|
package com.lagradost.cloudstream3.syncproviders
|
|
|
|
|
|
|
|
import com.lagradost.cloudstream3.ShowStatus
|
|
|
|
|
2021-11-20 00:41:37 +00:00
|
|
|
interface SyncAPI : OAuth2API {
|
2021-11-12 16:55:54 +00:00
|
|
|
data class SyncSearchResult(
|
|
|
|
val name: String,
|
|
|
|
val syncApiName: String,
|
|
|
|
val id: String,
|
2021-11-20 00:41:37 +00:00
|
|
|
val url: String,
|
2021-11-12 16:55:54 +00:00
|
|
|
val posterUrl: String?,
|
|
|
|
)
|
|
|
|
|
|
|
|
data class SyncNextAiring(
|
|
|
|
val episode: Int,
|
|
|
|
val unixTime: Long,
|
|
|
|
)
|
|
|
|
|
|
|
|
data class SyncActor(
|
|
|
|
val name: String,
|
|
|
|
val posterUrl: String?,
|
|
|
|
)
|
|
|
|
|
|
|
|
data class SyncCharacter(
|
|
|
|
val name: String,
|
|
|
|
val posterUrl: String?,
|
|
|
|
)
|
|
|
|
|
|
|
|
data class SyncStatus(
|
|
|
|
val status: Int,
|
|
|
|
/** 1-10 */
|
|
|
|
val score: Int?,
|
|
|
|
val watchedEpisodes: Int?,
|
|
|
|
var isFavorite: Boolean? = null,
|
|
|
|
)
|
|
|
|
|
|
|
|
data class SyncResult(
|
|
|
|
/**Used to verify*/
|
|
|
|
var id: String,
|
|
|
|
|
|
|
|
var totalEpisodes: Int? = null,
|
|
|
|
|
|
|
|
var title: String? = null,
|
|
|
|
/**1-1000*/
|
|
|
|
var publicScore: Int? = null,
|
|
|
|
/**In minutes*/
|
|
|
|
var duration: Int? = null,
|
|
|
|
var synopsis: String? = null,
|
|
|
|
var airStatus: ShowStatus? = null,
|
|
|
|
var nextAiring: SyncNextAiring? = null,
|
|
|
|
var studio: String? = null,
|
|
|
|
var genres: List<String>? = null,
|
|
|
|
var trailerUrl: String? = null,
|
|
|
|
|
|
|
|
/** In unixtime */
|
|
|
|
var startDate: Long? = null,
|
|
|
|
/** In unixtime */
|
|
|
|
var endDate: Long? = null,
|
|
|
|
var recommendations: List<SyncSearchResult>? = null,
|
|
|
|
var nextSeason: SyncSearchResult? = null,
|
|
|
|
var prevSeason: SyncSearchResult? = null,
|
|
|
|
var actors: List<SyncActor>? = null,
|
|
|
|
var characters: List<SyncCharacter>? = null,
|
|
|
|
)
|
|
|
|
|
2021-11-20 00:41:37 +00:00
|
|
|
val icon: Int
|
2021-11-12 16:55:54 +00:00
|
|
|
|
|
|
|
val mainUrl: String
|
2022-01-29 21:25:12 +00:00
|
|
|
suspend fun search(name: String): List<SyncSearchResult>?
|
2021-11-12 16:55:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
-1 -> None
|
|
|
|
0 -> Watching
|
|
|
|
1 -> Completed
|
|
|
|
2 -> OnHold
|
|
|
|
3 -> Dropped
|
|
|
|
4 -> PlanToWatch
|
|
|
|
5 -> ReWatching
|
|
|
|
*/
|
2022-01-29 21:25:12 +00:00
|
|
|
suspend fun score(id: String, status: SyncStatus): Boolean
|
2021-11-12 16:55:54 +00:00
|
|
|
|
2022-01-29 21:25:12 +00:00
|
|
|
suspend fun getStatus(id: String): SyncStatus?
|
2021-11-12 16:55:54 +00:00
|
|
|
|
2022-01-29 21:25:12 +00:00
|
|
|
suspend fun getResult(id: String): SyncResult?
|
2021-11-12 16:55:54 +00:00
|
|
|
}
|