MyDramaListAPI

abstract class MyDramaListAPI : MainAPI(source)

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class Cast(    val id: Long,     val name: String,     val url: String,     val slug: String,     val images: MyDramaListAPI.Images,     val characterName: String,     val role: String)
Link copied to clipboard
object Companion
Link copied to clipboard
data class Credits(val cast: List<MyDramaListAPI.Cast>, val crew: List<MyDramaListAPI.Crew>)
Link copied to clipboard
data class Crew(val id: Long, val name: String, val slug: String, val images: MyDramaListAPI.Images, val job: String)
Link copied to clipboard
data class Data(val type: TvType? = null, val media: MyDramaListAPI.MediaSummary? = null)
Link copied to clipboard
data class Genre(val id: Long, val name: String, val slug: String)
Link copied to clipboard
data class Images(val thumb: String? = null, val medium: String? = null, val poster: String? = null)
Link copied to clipboard
data class LinkData(    val id: Long? = null,     val type: String? = null,     val season: Int? = null,     val episode: Int? = null,     val title: String? = null,     val year: Int? = null,     val orgTitle: String? = null,     val lastSeason: Int? = null,     val date: String? = null,     val airedDate: String? = null)
Link copied to clipboard
data class Media(    val id: Long,     val slug: String,     val title: String,     val originalTitle: String,     val mediaYear: Int,     val episodes: Long,     val mediaRating: Double,     val permalink: String? = null,     val synopsis: String? = null,     val type: String? = null,     val mediaType: String? = null,     val country: String? = null,     val language: String? = null,     val images: MyDramaListAPI.Images,     val altTitles: List<String>? = null,     val votes: Long? = null,     val airedStart: String? = null,     val released: String? = null,     val releaseDatesFmt: String,     val genres: List<Any>? = null,     val trailer: MyDramaListAPI.Trailer?,     val watchers: Long,     val ranked: Long,     val popularity: Long,     val runtime: Long,     val reviewsCount: Long,     val recsCount: Long,     val commentsCount: Long,     val certification: String,     val status: String,     val enableAds: Boolean,     val sources: List<MyDramaListAPI.Source>,     val updatedAt: Long)
Link copied to clipboard
data class MediaSummary(    val id: Long,     val title: String,     val originalTitle: String,     val year: Int? = null,     val rating: Double? = null,     val permalink: String? = null,     val type: String,     val mediaType: String? = null,     val country: String? = null,     val language: String? = null,     val images: MyDramaListAPI.Images)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ShowEpisode(val id: Int, val episodeNumber: Int, val rating: Double, val votes: Int, val releasedAt: String)
Link copied to clipboard
Link copied to clipboard
data class ShowEpisodesItem(    val name: String,     val releaseDate: String,     val episodes: List<MyDramaListAPI.ShowEpisode>,     val timezone: String,     val total: Int)
Link copied to clipboard
data class Source(val xid: String, val name: String, val source: String, val sourceType: String, val link: String, val image: String)
Link copied to clipboard
data class Tag(val id: Long, val name: String, val slug: String)
Link copied to clipboard
data class Trailer(val id: Long? = null)
Link copied to clipboard
data class TrailerDetails(val id: Long, val source: String)
Link copied to clipboard
data class TrailerNode(val trailerDetails: MyDramaListAPI.TrailerDetails)
Link copied to clipboard
data class TrailerRoot(val trailer: MyDramaListAPI.TrailerNode)

Properties

Link copied to clipboard
Link copied to clipboard
open val getMainPageTimeoutMs: Long? = null

The timeout on the getMainPage functions in milliseconds.

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 val loadLinksTimeoutMs: Long? = null

The timeout on the loadLinks functions in milliseconds, By default this should be around a few minutes to prevent any unexpected recursive call/extraction to drain resources, however if you need very long extraction times, you can can request it by changing this variable.

Link copied to clipboard
open val loadTimeoutMs: Long? = null

The timeout on the loadSearch functions in milliseconds.

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

Main Url of the plugin that can be used directly in code or to be replaced using Clone site feature in settings

Link copied to clipboard
open override var name: String

Name of the plugin that will used in UI

Link copied to clipboard
open override val providerType: ProviderType
Link copied to clipboard
open val quickSearchTimeoutMs: Long? = null

The timeout on the quickSearch functions in milliseconds.

Link copied to clipboard
open val searchTimeoutMs: Long? = null

The timeout on the search functions in milliseconds.

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
fun MainAPI.newLiveSearchResponse(    name: String,     url: String,     type: TvType = TvType.Live,     fix: Boolean = true,     initializer: LiveSearchResponse.() -> Unit = { }): LiveSearchResponse
Link copied to clipboard
suspend fun MainAPI.newLiveStreamLoadResponse(    name: String,     url: String,     dataUrl: String,     initializer: suspend LiveStreamLoadResponse.() -> Unit = { }): LiveStreamLoadResponse
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.newTorrentLoadResponse(    name: String,     url: String,     magnet: String? = null,     torrent: String? = null,     initializer: suspend TorrentLoadResponse.() -> Unit = { }): TorrentLoadResponse
Link copied to clipboard
fun MainAPI.newTorrentSearchResponse(    name: String,     url: String,     type: TvType = TvType.Torrent,     fix: Boolean = true,     initializer: TorrentSearchResponse.() -> Unit = { }): TorrentSearchResponse
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>?
Link copied to clipboard

For APIs using the mainUrl in the prefix for MainAPI::load, this function replaces the scheme, host and port from an old link to the new mainUrl.