pub struct PlaybackState {
pub position: Option<Duration>,
pub watched: bool,
pub last_viewed_at: Option<SystemTime>,
pub play_count: u32,
pub last_played_at: Option<SystemTime>,
}Expand description
The session user’s progress on an item.
Fields§
§position: Option<Duration>Where playback stopped, or None if it never started.
watched: bool§last_viewed_at: Option<SystemTime>When the user last viewed it (Unix seconds on the wire): their last progress
report on it from any device, or its last mark as watched or
unwatched. Filled where its reply says so (Home’s rows, an item’s
details); None elsewhere, and for an item never viewed.
This and the two below are read as none when left out: the SDK keeps an item with its download, and a download kept by an older SDK lacks the keys.
play_count: u32How many times the user played it through: their counted plays from any device. Filled where its reply says so (an item’s details, Recently played); 0 elsewhere.
last_played_at: Option<SystemTime>When the user last played it (Unix seconds on the wire): the end of their
latest counted play. Filled where play_count is; None for an
item never played.
Implementations§
Source§impl PlaybackState
impl PlaybackState
Sourcepub fn resume_from(&self) -> Option<Duration>
pub fn resume_from(&self) -> Option<Duration>
Where a Play goes on from, as PlaybackOptions::start takes it:
None, the start, once watched or never begun; else where it
stopped.