TraktProvider

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class Airs(val day: String? = null, val time: String? = null, val timezone: String? = null)
Link copied to clipboard
data class Cast(val character: String? = null, val characters: List<String>? = null, val episodeCount: Long? = null, val person: TraktProvider.Person? = null, val images: TraktProvider.Images? = null)
Link copied to clipboard
data class Data(val type: TvType? = null, val mediaDetails: TraktProvider.MediaDetails? = null)
Link copied to clipboard
data class Ids(val trakt: Int? = null, val slug: String? = null, val tvdb: Int? = null, val imdb: String? = null, val tmdb: Int? = null, val tvrage: String? = null)
Link copied to clipboard
data class Images(val fanart: List<String>? = null, val poster: List<String>? = null, val logo: List<String>? = null, val clearart: List<String>? = null, val banner: List<String>? = null, val thumb: List<String>? = null, val screenshot: List<String>? = null, val headshot: List<String>? = null)
Link copied to clipboard
data class LinkData(val id: Int? = null, val traktId: Int? = null, val traktSlug: String? = null, val tmdbId: Int? = null, val imdbId: String? = null, val tvdbId: Int? = null, val tvrageId: String? = null, val type: String? = null, val season: Int? = null, val episode: Int? = null, val aniId: String? = null, val animeId: String? = null, val title: String? = null, val year: Int? = null, val orgTitle: String? = null, val isAnime: Boolean = false, val airedYear: Int? = null, val lastSeason: Int? = null, val epsTitle: String? = null, val jpTitle: String? = null, val date: String? = null, val airedDate: String? = null, val isAsian: Boolean = false, val isBollywood: Boolean = false, val isCartoon: Boolean = false)
Link copied to clipboard
data class MediaDetails(val title: String? = null, val year: Int? = null, val ids: TraktProvider.Ids? = null, val tagline: String? = null, val overview: String? = null, val released: String? = null, val runtime: Int? = null, val country: String? = null, val updatedAt: String? = null, val trailer: String? = null, val homepage: String? = null, val status: String? = null, val rating: Double? = null, val votes: Long? = null, val commentCount: Long? = null, val language: String? = null, val languages: List<String>? = null, val availableTranslations: List<String>? = null, val genres: List<String>? = null, val certification: String? = null, val airedEpisodes: Int? = null, val firstAired: String? = null, val airs: TraktProvider.Airs? = null, val network: String? = null, val images: TraktProvider.Images? = null, val media: TraktProvider.MediaDetails? = null)
Link copied to clipboard
data class People(val cast: List<TraktProvider.Cast>? = null)
Link copied to clipboard
data class Person(val name: String? = null, val ids: TraktProvider.Ids? = null, val images: TraktProvider.Images? = null)
Link copied to clipboard
data class Seasons(val airedEpisodes: Int? = null, val episodeCount: Int? = null, val episodes: List<TraktProvider.TraktEpisode>? = null, val firstAired: String? = null, val ids: TraktProvider.Ids? = null, val images: TraktProvider.Images? = null, val network: String? = null, val number: Int? = null, val overview: String? = null, val rating: Double? = null, val title: String? = null, val updatedAt: String? = null, val votes: Int? = null)
Link copied to clipboard
data class TraktEpisode(val availableTranslations: List<String>? = null, val commentCount: Int? = null, val episodeType: String? = null, val firstAired: String? = null, val ids: TraktProvider.Ids? = null, val images: TraktProvider.Images? = null, val number: Int? = null, val numberAbs: Int? = null, val overview: String? = null, val rating: Double? = null, val runtime: Int? = null, val season: Int? = null, val title: String? = null, val updatedAt: String? = null, val votes: Int? = null)

Properties

Link copied to clipboard
Link copied to clipboard
open val hasChromecastSupport: Boolean = true

Set false if links require referer or for some reason cant be played on a chromecast

Link copied to clipboard
open val hasDownloadSupport: Boolean = true

If all links are encrypted then set this to false

Link copied to clipboard
open override val hasMainPage: Boolean = true
Link copied to clipboard
open val hasQuickSearch: Boolean = false
Link copied to clipboard
open val instantLinkLoading: Boolean = false

If link is stored in the "data" string, so links can be instantly loaded

Link copied to clipboard
open var lang: String
Link copied to clipboard

used to keep track when last homepage request was in unixtime ms

Link copied to clipboard
open override val mainPage: List<MainPageData>
Link copied to clipboard
open var mainUrl: String
Link copied to clipboard
open override var name: String
Link copied to clipboard
open override val providerType: ProviderType
Link copied to clipboard

if this is turned on then it will request the homepage one after the other, used to delay if they block many request at the same time

Link copied to clipboard

in milliseconds, this can be used to add more delay between homepage requests on first load if sequentialMainPage is turned on

Link copied to clipboard

in milliseconds, this can be used to add more delay between homepage requests when scrolling

Link copied to clipboard

Determines which plugin a given provider is from. This is the full path to the plugin.

Link copied to clipboard
Link copied to clipboard

A set of which ids the provider can open with getLoadUrl() If the set contains SyncIdName.Imdb then getLoadUrl() can be started with an Imdb class which inherits from SyncId.

Link copied to clipboard
open override val supportedTypes: Set<TvType>
Link copied to clipboard
open val usesWebView: Boolean = false

Used for testing and can be used to disable the providers if WebView is not available

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun extractorVerifierJob(extractorData: String?)

Largely redundant feature for most providers.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend fun getLoadUrl(name: SyncIdName, id: String): String?

Get the load() url based on a sync ID like IMDb or MAL. Only contains SyncIds based on supportedSyncUrls.

Link copied to clipboard
open suspend override fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse
Link copied to clipboard
open fun getVideoInterceptor(extractorLink: ExtractorLink): Interceptor?

An okhttp interceptor for used in OkHttpDataSource

Link copied to clipboard
fun init()
Link copied to clipboard
open suspend override fun load(url: String): LoadResponse

Based on data from search() or getMainPage() it generates a LoadResponse, basically opening the info page from a link.

Link copied to clipboard
open suspend fun loadLinks(data: String, isCasting: Boolean, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit): Boolean

Callback is fired once a link is found, will return true if method is executed successfully

Link copied to clipboard
suspend fun MainAPI.newAnimeLoadResponse(name: String, url: String, type: TvType, comingSoonIfNone: Boolean = true, initializer: suspend AnimeLoadResponse.() -> Unit = { }): AnimeLoadResponse
Link copied to clipboard
fun MainAPI.newAnimeSearchResponse(name: String, url: String, type: TvType = TvType.Anime, fix: Boolean = true, initializer: AnimeSearchResponse.() -> Unit = { }): AnimeSearchResponse
Link copied to clipboard
fun <T> MainAPI.newEpisode(data: T, initializer: Episode.() -> Unit = { }): Episode
fun MainAPI.newEpisode(url: String, initializer: Episode.() -> Unit = { }, fix: Boolean = true): Episode
Link copied to clipboard
suspend fun <T> MainAPI.newMovieLoadResponse(name: String, url: String, type: TvType, data: T?, initializer: suspend MovieLoadResponse.() -> Unit = { }): MovieLoadResponse
suspend fun MainAPI.newMovieLoadResponse(name: String, url: String, type: TvType, dataUrl: String, initializer: suspend MovieLoadResponse.() -> Unit = { }): MovieLoadResponse
Link copied to clipboard
fun MainAPI.newMovieSearchResponse(name: String, url: String, type: TvType = TvType.Movie, fix: Boolean = true, initializer: MovieSearchResponse.() -> Unit = { }): MovieSearchResponse
Link copied to clipboard
suspend fun MainAPI.newTvSeriesLoadResponse(name: String, url: String, type: TvType, episodes: List<Episode>, initializer: suspend TvSeriesLoadResponse.() -> Unit = { }): TvSeriesLoadResponse
Link copied to clipboard
fun MainAPI.newTvSeriesSearchResponse(name: String, url: String, type: TvType = TvType.TvSeries, fix: Boolean = true, initializer: TvSeriesSearchResponse.() -> Unit = { }): TvSeriesSearchResponse
Link copied to clipboard
Link copied to clipboard
open suspend fun quickSearch(query: String): List<SearchResponse>?
Link copied to clipboard
open suspend override fun search(query: String): List<SearchResponse>?