Skip to main content

Module downloads

Module downloads 

Source
Expand description

Downloads for offline viewing (feature spoolframe:downloads): the messages of crate::Request::DownloadOptions, crate::Request::PrepareDownload, crate::Request::DownloadStatus, crate::Request::CancelDownload and crate::Request::SyncOfflineWatch, the crate::Event::DownloadChanged event, and the crate::resource::ResourceRequest::Download read.

A download is a film or an episode written as one file for the device: the source file as it is (with every track, when the device plays it so), a remux of the tracks chosen, or a remux with what the device cannot play converted. Apple devices (iOS, iPadOS, macOS) get MP4, Linux ones Matroska; tvOS and the web have none. Tracks are named by their place in the item’s Tracks: audio[i], subtitles[i].

With spoolframe:music-downloads too, a download may be a track: in original quality, the file as it is when the device plays it, byte for byte; else, converted, lossless as ALAC (Apple) or FLAC (Linux) and lossy as AAC; or as AAC at 256 kbit/s (aac256). A converted track keeps its tags and its cover. What a device follows (an artist, a playlist, Liked) is asked with crate::Request::MusicDownloadChanges, and what it played offline sent with crate::Request::SyncOfflinePlays.

With spoolframe:download-addons, a device adds tracks to a download it has (crate::Request::DownloadAddonOptions): a subtitle read as WebVTT (crate::Request::ReadTrackSubtitle), and an audio track downloaded as a file of its own (crate::Request::PrepareAudioAddon), which is a download like any other.

Structs§

AddonAudio
An audio track as an add-on (PrepareAudioAddon): an M4A on an Apple device, a Matroska audio file on Linux.
AddonSubtitle
A subtitle as an add-on (ReadTrackSubtitle), always WebVTT.
DownloadAddonOptions
What may be added to a download of an item without fetching the film again (DownloadAddonOptions, feature spoolframe:download-addons): each audio track as a file of its own, and each subtitle as WebVTT.
DownloadDevice
The device a paired server’s item is downloaded for. The user’s home server sends it with DownloadOptions and PrepareDownload on the item’s server, which plans for this device rather than for the home server’s own Hello, as StartPlayback’s capabilities does for a play.
DownloadEstimate
About one download option (DownloadOptions): how large it is and whether it waits for a conversion.
DownloadFile
What a download’s file is: for a player, and for labelling its tracks offline.
DownloadInfo
A download, as PrepareDownload and DownloadStatus answer.
DownloadOptionsInfo
What the device may download of an item (DownloadOptions).
FileTracks
The tracks a download’s file carries, by their place in Tracks, in the file’s order after its video.
FollowedChange
One followed thing’s tracks (MusicDownloadChanges).
LeftOutSubtitle
A subtitle a download would leave out, and why (DownloadOptions): a picture subtitle in an Apple file when the viewer prefers pictures (MP4 carries none), or one the server cannot write to a file.
OfflineLike
A track liked or unliked on a device with no server (SyncOfflinePlays).
OfflinePlay
A track played on a device with no server (SyncOfflinePlays).
OfflineWatch
Where a device got to in an item while it had no server (SyncOfflineWatch).

Enums§

DownloadFailure
Why a download failed (DownloadState::Failed), beside its reason in words.
DownloadReadiness
Whether a download option waits for a conversion.
DownloadSource
What a download is made from.
DownloadState
Where a download is.
DownloadTracks
Which tracks a download carries. The video is always there.
FailureRemedy
What to offer for a download that failed, by its cause (DownloadFailure::suggested).
Followed
What a device’s music download follows: it keeps every track of it, as it is now.
FollowedTracks
The tracks a followed thing holds, against the cursor asked with.
OfflineWatchOutcome
What became of one OfflineWatch, and of one OfflinePlay or OfflineLike.
OriginalDownload
What a download in original quality with every track would be (DownloadOptions::original).

Constants§

MAX_ASKED
The most ids one DownloadStatus asks about, and the most entries one SyncOfflineWatch carries.
MAX_FOLLOWED
The most artists and playlists one MusicDownloadChanges asks about, together.