DownloadObjects

Types

Link copied to clipboard
data class CreateNotificationMetadata(val type: VideoDownloadManager.DownloadType, val bytesDownloaded: Long, val bytesTotal: Long, val hlsProgress: Long? = null, val hlsTotal: Long? = null, val bytesPerSecond: Long)
Link copied to clipboard
abstract class DownloadCached(val id: Int)
Link copied to clipboard
data class DownloadedFileInfo(val totalBytes: Long, val relativePath: String, val displayName: String, val extraInfo: String? = null, val basePath: String? = null, val linkHash: Int? = null)
Link copied to clipboard
data class DownloadedFileInfoResult(val fileLength: Long, val totalBytes: Long, val path: Uri)
Link copied to clipboard
data class DownloadEpisodeCached(val name: String?, val poster: String?, val episode: Int, val season: Int?, val parentId: Int, var score: Score? = null, val description: String?, val cacheTime: Long, val id: Int) : DownloadObjects.DownloadCached
Link copied to clipboard
data class DownloadEpisodeMetadata(val id: Int, val parentId: Int, val mainName: String, val sourceApiName: String?, val poster: String?, val name: String?, val season: Int?, val episode: Int?, val type: TvType?)

Metadata for a specific episode and how to display it.

Link copied to clipboard
data class DownloadHeaderCached(val apiName: String, val url: String, val type: TvType, val name: String, val poster: String?, val cacheTime: Long, val id: Int) : DownloadObjects.DownloadCached

What to display to the user for a downloaded show/movie. Includes info such as name, poster and url

Link copied to clipboard
data class DownloadItem(val source: String?, val folder: String?, val ep: DownloadObjects.DownloadEpisodeMetadata, val links: List<ExtractorLink>)
Link copied to clipboard
data class DownloadQueueItem(val episode: ResultEpisode, val isMovie: Boolean, val resultName: String, val resultType: TvType, val resultPoster: String?, val apiName: String, val resultId: Int, val resultUrl: String, val links: List<ExtractorLink>? = null, val subs: List<SubtitleData>? = null)

General data about the episode and show to start a download from.

Link copied to clipboard

An item can either be something to resume or something new to start

Link copied to clipboard
data class DownloadResumePackage(val item: DownloadObjects.DownloadItem, val linkIndex: Int?)
Link copied to clipboard
data class DownloadStatus(val retrySame: Boolean, val tryNext: Boolean, val success: Boolean)
Link copied to clipboard
data class LazyStreamDownloadResponse(val bytes: ByteArray, val startByte: Long, val endByte: Long)

bytes have the size end-start where the byte range is [start,end) note that ByteArray is a pointer and therefore cant be stored without cloning it

Link copied to clipboard
data class ResumeWatching(val parentId: Int, val episodeId: Int?, val episode: Int?, val season: Int?, val updateTime: Long, val isFromDownload: Boolean)
Link copied to clipboard
data class StreamData(fileLength: Long, val file: SafeFile)