DownloadStatus

Download status information corresponding to a media download.

Constructors

Link copied to clipboard
constructor(@NonNull mediaInfo: MediaInfo, @Nullable localStorageFolder: String, status: Int, reason: Int, @Nullable reasonDescription: String, lastModifiedTime: Long, totalSizeBytes: Long, bytesDownloaded: Long, downloadPercent: Int, @Nullable posterPath: String, isSavedOffline: Boolean, @Nullable displayTitle: String, @Nullable displayDescription: String)

Properties

Link copied to clipboard
Number of bytes downloaded for this download.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Overall download progress as percentage.
Link copied to clipboard
Keeps the track of download type, if true media is downloaded without license key, else media is downloaded with license key.
Link copied to clipboard
Timestamp when the download was last modified, in currentTimeMillis.
Link copied to clipboard
open var lastPlayedAt: Date
Link copied to clipboard
Path to a folder where all the media assets for this download will be downloaded.
Link copied to clipboard
A MediaInfo object containing information about the media this DownloadStatus corresponds to.
Link copied to clipboard
Link copied to clipboard
Path to a poster file for the download; null if poster not available yet.
Link copied to clipboard
val reason: Int
More detail on status of the download.
Link copied to clipboard
Optional description in addition to reason.
Link copied to clipboard
val status: Int
Status of this download.
Link copied to clipboard
Total size of the download in bytes.

Functions

Link copied to clipboard
open fun createForCompleted(@NonNull mediaInfo: MediaInfo, localStorageFolder: String, lastModifiedTime: Long, totalSizeBytes: Long, bytesDownloaded: Long, downloadPercent: Int, posterPath: String, isSavedOffline: Boolean): DownloadStatus
Link copied to clipboard
open fun createForFailed(@NonNull mediaInfo: MediaInfo, localStorageFolder: String, reason: Int, reasonDescription: String, lastModifiedTime: Long, totalSizeBytes: Long, bytesDownloaded: Long, downloadPercent: Int, posterPath: String, isSavedOffline: Boolean): DownloadStatus
Link copied to clipboard
Link copied to clipboard
open fun createForPaused(@NonNull mediaInfo: MediaInfo, localStorageFolder: String, reason: Int, lastModifiedTime: Long, totalSizeBytes: Long, bytesDownloaded: Long, downloadPercent: Int, posterPath: String, isSavedOffline: Boolean): DownloadStatus
Link copied to clipboard
open fun createForPending(@NonNull mediaInfo: MediaInfo, localStorageFolder: String, lastModifiedTime: Long, totalSizeBytes: Long, isSavedOffline: Boolean): DownloadStatus
Link copied to clipboard
open fun createForRunning(@NonNull mediaInfo: MediaInfo, localStorageFolder: String, lastModifiedTime: Long, totalSizeBytes: Long, bytesDownloaded: Long, downloadPercent: Int, posterPath: String, isSavedOffline: Boolean): DownloadStatus
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getSecurityLevel(downloadRequest: DownloadRequest): Utils.WidevineLevel
Link copied to clipboard
open fun getState(status: Int): Int
Link copied to clipboard
open fun getStatus(@Download.State state: Int): Int
Link copied to clipboard
open fun isExpired(context: Context): Boolean