Package-level declarations

Types

Link copied to clipboard
data class Actor(val name: String, val image: String? = null)

Data class hold Actor personal information

Link copied to clipboard
data class ActorData(val actor: Actor, val role: ActorRole? = null, val roleString: String? = null, val voiceActor: Actor? = null)

Data class hold Actor information

Link copied to clipboard

enum class of Actor roles (Main, Supporting, Background).

Link copied to clipboard
data class AnimeLoadResponse(    var engName: String? = null,     var japName: String? = null,     var name: String,     var url: String,     var apiName: String,     var type: TvType,     var posterUrl: String? = null,     var year: Int? = null,     var episodes: MutableMap<DubStatus, List<Episode>> = mutableMapOf(),     var showStatus: ShowStatus? = null,     var plot: String? = null,     var tags: List<String>? = null,     var synonyms: List<String>? = null,     var rating: Int? = null,     var duration: Int? = null,     var trailers: MutableList<TrailerData> = mutableListOf(),     var recommendations: List<SearchResponse>? = null,     var actors: List<ActorData>? = null,     var comingSoon: Boolean = false,     var syncData: MutableMap<String, String> = mutableMapOf(),     var posterHeaders: Map<String, String>? = null,     var nextAiring: NextAiring? = null,     var seasonNames: List<SeasonData>? = null,     var backgroundPosterUrl: String? = null,     var contentRating: String? = null) : LoadResponse, EpisodeResponse

Data class of LoadResponse interface for Anime.

Link copied to clipboard
data class AnimeSearchResponse(    val name: String,     val url: String,     val apiName: String,     var type: TvType? = null,     var posterUrl: String? = null,     var year: Int? = null,     var dubStatus: EnumSet<DubStatus>? = null,     var otherName: String? = null,     var episodes: MutableMap<DubStatus, Int> = mutableMapOf(),     var id: Int? = null,     var quality: SearchQuality? = null,     var posterHeaders: Map<String, String>? = null) : SearchResponse

Data class of SearchResponse interface for Anime.

Link copied to clipboard
data class AniSearch(var data: AniSearch.Data? = Data())
Link copied to clipboard
object APIHolder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class Episode(    var data: String,     var name: String? = null,     var season: Int? = null,     var episode: Int? = null,     var posterUrl: String? = null,     var rating: Int? = null,     var description: String? = null,     var date: Long? = null,     var runTime: Int? = null)

Episode information that will be passed to LoadLinks function & showed on UI

Link copied to clipboard
interface EpisodeResponse

Abstract interface of EpisodeResponse

Link copied to clipboard
class ErrorLoadingException(message: String? = null) : Exception
Link copied to clipboard
data class HomePageList(val name: String, var list: List<SearchResponse>, val isHorizontalImages: Boolean = false)

Data class for the Homepage list info.

Link copied to clipboard
data class HomePageResponse(val items: List<HomePageList>, val hasNext: Boolean = false)

Data class for the Homepage response info.

Link copied to clipboard
Link copied to clipboard
data class LiveSearchResponse(    val name: String,     val url: String,     val apiName: String,     var type: TvType? = null,     var posterUrl: String? = null,     var id: Int? = null,     var quality: SearchQuality? = null,     var posterHeaders: Map<String, String>? = null,     var lang: String? = null) : SearchResponse

Data class of SearchResponse interface for Live streams.

Link copied to clipboard
data class LiveStreamLoadResponse(    var name: String,     var url: String,     var apiName: String,     var dataUrl: String,     var posterUrl: String? = null,     var year: Int? = null,     var plot: String? = null,     var type: TvType = TvType.Live,     var rating: Int? = null,     var tags: List<String>? = null,     var duration: Int? = null,     var trailers: MutableList<TrailerData> = mutableListOf(),     var recommendations: List<SearchResponse>? = null,     var actors: List<ActorData>? = null,     var comingSoon: Boolean = false,     var syncData: MutableMap<String, String> = mutableMapOf(),     var posterHeaders: Map<String, String>? = null,     var backgroundPosterUrl: String? = null,     var contentRating: String? = null) : LoadResponse

Data class of LoadResponse interface for Live streams.

Link copied to clipboard
interface LoadResponse

Abstract interface of LoadResponse responses

Link copied to clipboard
abstract class MainAPI

Every provider will not have try catch built in, so handle exceptions when calling these functions

Link copied to clipboard
data class MainPageData(val name: String, val data: String, val horizontalImages: Boolean = false)
Link copied to clipboard
data class MainPageRequest(val name: String, val data: String, val horizontalImages: Boolean)
Link copied to clipboard
data class MovieLoadResponse(    var name: String,     var url: String,     var apiName: String,     var type: TvType,     var dataUrl: String,     var posterUrl: String? = null,     var year: Int? = null,     var plot: String? = null,     var rating: Int? = null,     var tags: List<String>? = null,     var duration: Int? = null,     var trailers: MutableList<TrailerData> = mutableListOf(),     var recommendations: List<SearchResponse>? = null,     var actors: List<ActorData>? = null,     var comingSoon: Boolean = false,     var syncData: MutableMap<String, String> = mutableMapOf(),     var posterHeaders: Map<String, String>? = null,     var backgroundPosterUrl: String? = null,     var contentRating: String? = null) : LoadResponse

Data class of LoadResponse interface for Movies.

Link copied to clipboard
data class MovieSearchResponse(    val name: String,     val url: String,     val apiName: String,     var type: TvType? = null,     var posterUrl: String? = null,     var year: Int? = null,     var id: Int? = null,     var quality: SearchQuality? = null,     var posterHeaders: Map<String, String>? = null) : SearchResponse

Data class of SearchResponse interface for Movies.

Link copied to clipboard
data class NextAiring(val episode: Int, val unixTime: Long, val season: Int? = null)

Data class holds next airing Episode info.

Link copied to clipboard
annotation class Prerelease

Api has not yet been published to stable, and will cause NoSuchMethodException on stable

Link copied to clipboard
data class ProvidersInfoJson(var name: String, var url: String, var credentials: String? = null, var status: Int)
Link copied to clipboard

enum class determines provider type:

Link copied to clipboard

enum class holds search quality.

Link copied to clipboard
interface SearchResponse

Abstract interface of SearchResponse.

Link copied to clipboard
data class SeasonData(val season: Int, val name: String? = null, val displaySeason: Int? = null)

Data class holds season info.

Link copied to clipboard
data class SettingsJson(var enableAdult: Boolean = false)
Link copied to clipboard

enum class determines Show status (Completed or Ongoing)

Link copied to clipboard

Set of sync services simkl is compatible with. Add more as required: https://simkl.docs.apiary.io/#reference/search/id-lookup/get-items-by-id

Link copied to clipboard
data class SubtitleFile(val lang: String, val url: String)

Data class for the Subtitle file info.

Link copied to clipboard
data class TorrentLoadResponse(    var name: String,     var url: String,     var apiName: String,     var magnet: String?,     var torrent: String?,     var plot: String?,     var type: TvType = TvType.Torrent,     var posterUrl: String? = null,     var year: Int? = null,     var rating: Int? = null,     var tags: List<String>? = null,     var duration: Int? = null,     var trailers: MutableList<TrailerData> = mutableListOf(),     var recommendations: List<SearchResponse>? = null,     var actors: List<ActorData>? = null,     var comingSoon: Boolean = false,     var syncData: MutableMap<String, String> = mutableMapOf(),     var posterHeaders: Map<String, String>? = null,     var backgroundPosterUrl: String? = null,     var contentRating: String? = null) : LoadResponse

Data class of LoadResponse interface for Torrent.

Link copied to clipboard
data class TorrentSearchResponse(    val name: String,     val url: String,     val apiName: String,     var type: TvType?,     var posterUrl: String?,     var id: Int? = null,     var quality: SearchQuality? = null,     var posterHeaders: Map<String, String>? = null) : SearchResponse

Data class of SearchResponse interface for Torrent.

Link copied to clipboard
data class Tracker(val malId: Int? = null, val aniId: String? = null, val image: String? = null, val cover: String? = null)
Link copied to clipboard

used for the getTracker() method

Link copied to clipboard
data class TrailerData(val extractorUrl: String, val referer: String?, val raw: Boolean, val headers: Map<String, String> = mapOf())

Data class of Trailer data.

Link copied to clipboard
data class TvSeriesLoadResponse(    var name: String,     var url: String,     var apiName: String,     var type: TvType,     var episodes: List<Episode>,     var posterUrl: String? = null,     var year: Int? = null,     var plot: String? = null,     var showStatus: ShowStatus? = null,     var rating: Int? = null,     var tags: List<String>? = null,     var duration: Int? = null,     var trailers: MutableList<TrailerData> = mutableListOf(),     var recommendations: List<SearchResponse>? = null,     var actors: List<ActorData>? = null,     var comingSoon: Boolean = false,     var syncData: MutableMap<String, String> = mutableMapOf(),     var posterHeaders: Map<String, String>? = null,     var nextAiring: NextAiring? = null,     var seasonNames: List<SeasonData>? = null,     var backgroundPosterUrl: String? = null,     var contentRating: String? = null) : LoadResponse, EpisodeResponse

Data class of LoadResponse interface for Tv series.

Link copied to clipboard
data class TvSeriesSearchResponse(    val name: String,     val url: String,     val apiName: String,     var type: TvType? = null,     var posterUrl: String? = null,     var year: Int? = null,     var episodes: Int? = null,     var id: Int? = null,     var quality: SearchQuality? = null,     var posterHeaders: Map<String, String>? = null) : SearchResponse

Data class of SearchResponse interface for Tv series.

Link copied to clipboard
enum TvType : Enum<TvType>
Link copied to clipboard

enum class determines VPN status (Non, MightBeNeeded or Torrent)

Properties

Link copied to clipboard

Defines the constant for the all languages preference, if this is set then it is the equivalent of all languages being set

Link copied to clipboard
var app: Requests
Link copied to clipboard
val mapper: JsonMapper
Link copied to clipboard
Link copied to clipboard
const val PROVIDER_STATUS_DOWN: Int = 0
Link copied to clipboard
Link copied to clipboard
const val PROVIDER_STATUS_OK: Int = 1
Link copied to clipboard
const val PROVIDER_STATUS_SLOW: Int = 2
Link copied to clipboard
const val USER_AGENT: String

Functions

Link copied to clipboard
fun Episode.addDate(date: Date?)
fun Episode.addDate(date: String?, format: String = "yyyy-MM-dd")
Link copied to clipboard
Link copied to clipboard
fun AnimeSearchResponse.addDubStatus(status: DubStatus, episodes: Int? = null)
fun AnimeSearchResponse.addDubStatus(isDub: Boolean, episodes: Int? = null)
fun AnimeSearchResponse.addDubStatus(status: String, episodes: Int? = null)
fun AnimeSearchResponse.addDubStatus(dubExist: Boolean, subExist: Boolean, dubEpisodes: Int? = null, subEpisodes: Int? = null)
Link copied to clipboard

If episodes already exist appends the list.

Link copied to clipboard
fun LoadResponse.addPoster(url: String?, headers: Map<String, String>? = null)

Extension function that adds poster to LoadResponse

fun SearchResponse.addPoster(url: String?, headers: Map<String, String>? = null)

Extension function that adds poster to SearchResponse

Link copied to clipboard

Extension function that adds quality to SearchResponse

Link copied to clipboard
@JvmName(name = "addSeasonNamesSeasonData")
fun EpisodeResponse.addSeasonNames(names: List<SeasonData>)
@JvmName(name = "addSeasonNamesString")
fun EpisodeResponse.addSeasonNames(names: List<String>)
Link copied to clipboard
Link copied to clipboard
suspend fun <A, B> List<A>.amap(f: suspend (A) -> B): List<B>
suspend fun <K, V, R> Map<out K, V>.amap(f: suspend (Map.Entry<K, V>) -> R): List<R>

Short for "Asynchronous Map", runs on all values concurrently, this means that if you are not doing networking, you should use a regular map

Link copied to clipboard
suspend fun <A, B> List<A>.amapIndexed(f: suspend (index: Int, A) -> B): List<B>

Short for "Asynchronous Map" with an Index, runs on all values concurrently, this means that if you are not doing networking, you should use a regular mapIndexed

Link copied to clipboard
fun <A, B> List<A>.apmap(f: suspend (A) -> B): List<B>
fun <K, V, R> Map<out K, V>.apmap(f: suspend (Map.Entry<K, V>) -> R): List<R>

Short for "Asynchronous Parallel Map", but is not really parallel, only concurrent.

Link copied to clipboard
fun <A, B> List<A>.apmapIndexed(f: suspend (index: Int, A) -> B): List<B>

Short for "Asynchronous Parallel Map" with an Index, but is not really parallel, only concurrent.

Link copied to clipboard
fun <R> argamap(vararg transforms: suspend () -> R): List<R?>

Short for "Argument Asynchronous Map" because it allows for a variadic number of paramaters.

Link copied to clipboard
fun base64Decode(string: String): String

Might need a different implementation for desktop

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Capitalize the first letter of string.

Link copied to clipboard

Capitalize the first letter of string.

Link copied to clipboard
fun fetchUrls(text: String?): List<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extension function to get the folder prefix based on the TvType. Non-episode-based types will return a base folder name, while episode-based types will have their files placed in subfolders using a sanitized title name.

Link copied to clipboard
Link copied to clipboard

Returns SearchQuality from String.

Link copied to clipboard
suspend fun getRhinoContext(): Context

Get rhino context in a safe way as it needs to be initialized on the main thread.

Link copied to clipboard

https://www.imdb.com/title/tt2861424/ -> tt2861424

Link copied to clipboard

https://www.imdb.com/title/tt2861424/ -> tt2861424

Link copied to clipboard

Extension function of LoadResponse to check if it's Anime based.

Link copied to clipboard

Extension function of TvType to check if the type has an Anime opening.

Link copied to clipboard

Extension function of TvType to check if the type is Audio.

Link copied to clipboard

Extension function of LoadResponse to check if it's Episode based.

Extension function to determine if the TvType is episode-based. This function checks if the type corresponds to an episode-based format. Episode-based types will be placed in subfolders that include the sanitized title name. This check is used for other logic as well.

Link copied to clipboard

Extension function of TvType to check if the type is Live stream.

Link copied to clipboard

Extension function of TvType to check if the type is Movie.

Link copied to clipboard
fun mainPage(url: String, name: String, horizontalImages: Boolean = false): MainPageData

Create MainPageData from url, name Strings & layout (Horizontal/Vertical) Boolean.

Link copied to clipboard
fun mainPageOf(vararg elements: MainPageData): List<MainPageData>
fun mainPageOf(vararg elements: Pair<String, String>): List<MainPageData>

return list of MainPageData with url to name, make for more readable code

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
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
suspend fun <R> runAllAsync(vararg transforms: suspend () -> R): List<R?>

Runs all different functions at the same time and awaits for all to be finished, then returns a list of all those items or null if they fail. However Unit is often used.

Link copied to clipboard

Sort the urls based on quality

Link copied to clipboard
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.