pub enum Item {
Movie(Movie),
Show(Show),
Season(Season),
Episode(Episode),
Artist(Artist),
Album(Album),
Track(Track),
}Expand description
Any one item a catalog returns. On the wire it is the item’s own object
with a kind field added, for example {"kind": "movie", "id": …}.
Variants§
Implementations§
Source§impl Item
impl Item
Sourcepub fn merge(&self) -> Option<&MergeFacts>
pub fn merge(&self) -> Option<&MergeFacts>
What a merged library sorts and matches it by; None for a
season, which has none.
Sourcepub fn merge_mut(&mut self) -> Option<&mut MergeFacts>
pub fn merge_mut(&mut self) -> Option<&mut MergeFacts>
Item::merge, to change.
Source§impl Item
impl Item
Sourcepub fn caption_parts(&self, today: CalendarDate) -> Option<Caption>
pub fn caption_parts(&self, today: CalendarDate) -> Option<Caption>
What a card says under its title on today; None for an artist
or where nothing is known.
pub fn id(&self) -> &MediaId
Sourcepub fn title(&self) -> &str
pub fn title(&self) -> &str
Its own name: a film’s, an episode’s or a track’s title; an artist’s name.
Sourcepub fn artwork_of(&self, kind: ArtworkKind) -> Option<&Artwork>
pub fn artwork_of(&self, kind: ArtworkKind) -> Option<&Artwork>
Its first artwork of kind: what a row or a page shows.
Sourcepub fn playback(&self) -> Option<&PlaybackState>
pub fn playback(&self) -> Option<&PlaybackState>
The user’s progress on a film, an episode or a track; None for
the kinds that do not play themselves.
Sourcepub fn is_watched(&self) -> bool
pub fn is_watched(&self) -> bool
The user watched it (or played it to its end).
Sourcepub fn resume_position(&self) -> Option<Duration>
pub fn resume_position(&self) -> Option<Duration>
Where the user stopped in it, watched or not.
Sourcepub fn resume_from(&self) -> Option<Duration>
pub fn resume_from(&self) -> Option<Duration>
Where a Play goes on from (PlaybackState::resume_from).
Sourcepub fn progress(&self) -> Option<Progress>
pub fn progress(&self) -> Option<Progress>
How far through it the user is (PlaybackState::progress);
None for the kinds that do not play themselves.