Skip to main content

RemoteItem

Struct RemoteItem 

Source
pub struct RemoteItem {
Show 27 fields pub id: String, pub kind: RemoteKind, pub title: String, pub parent: Option<String>, pub grandparent: Option<String>, pub parent_title: Option<String>, pub grandparent_title: Option<String>, pub index: Option<u32>, pub parent_index: Option<u32>, pub year: Option<u16>, pub date: Option<String>, pub summary: Option<String>, pub content_rating: Option<String>, pub duration_ms: Option<u64>, pub count: Option<u32>, pub genres: Vec<String>, pub artwork: Vec<RemoteArtwork>, pub external_ids: Vec<String>, pub sort_title: Option<String>, pub released: Option<String>, pub added_at: Option<i64>, pub rating_tenths: Option<u16>, pub audience_rating_tenths: Option<u16>, pub size: Option<u64>, pub resolution: Option<Resolution>, pub dynamic_range: Option<DynamicRange>, pub hash: String,
}
Expand description

One item of a shared library, as the sharing server has it. Ids are the sharing server’s own; the server that caches it names them as its origin’s (spoolframe_types::MediaId::federated).

Its place in the hierarchy: a season’s parent is its show; an episode’s parent its season and grandparent its show; an album’s parent its artist; a track’s parent its album and grandparent its artist. index is a season’s number, an episode’s, a track’s; parent_index an episode’s season number, a track’s disc.

Fields§

§id: String§kind: RemoteKind§title: String

A title, or an artist’s name.

§parent: Option<String>§grandparent: Option<String>§parent_title: Option<String>

The parent’s title: a season’s or episode’s show, an album’s artist, a track’s album.

§grandparent_title: Option<String>

The grandparent’s: a track’s artist.

§index: Option<u32>§parent_index: Option<u32>§year: Option<u16>§date: Option<String>

A film’s release, an episode’s air date, a show’s last airing: YYYY-MM-DD.

§summary: Option<String>§content_rating: Option<String>§duration_ms: Option<u64>§count: Option<u32>

A show’s season count, an album’s track count, a track’s album’s.

§genres: Vec<String>§artwork: Vec<RemoteArtwork>§external_ids: Vec<String>

Its stable ids outside the sharing server’s keys: TMDB, IMDb, TVDB, MusicBrainz, Plex’s guid (tmdb://603). What progress per title (P8-03) and merged search (P8-05) match on.

§sort_title: Option<String>

What a library is sorted and filtered by (spoolframe_types::browse), each left out when the sharing server has none: one from before them sends none, and the item hashes as it did. A film’s, a show’s or an artist’s.

§released: Option<String>

The day it first came out, YYYY-MM-DD: a film’s release, a show’s first airing (where date is its last).

§added_at: Option<i64>

When it was added to the sharing server’s catalog, Unix seconds.

§rating_tenths: Option<u16>

The critic rating, in tenths: 0 to 100.

§audience_rating_tenths: Option<u16>

The audience rating, in tenths: 0 to 100.

§size: Option<u64>

A film’s file size, its first version’s, in bytes.

§resolution: Option<Resolution>

A film’s resolution class, its first version’s.

§dynamic_range: Option<DynamicRange>

A film’s dynamic range, its first version’s: sdr, hdr (not Dolby Vision) or dolby_vision.

§hash: String

The content hash (RemoteItem::digest) the sharing server diffed by: unchanged, unchanged item.

Implementations§

Source§

impl RemoteItem

Source

pub fn digest(&self) -> String

The content hash of everything but hash: blake3, hex. Two items with the same hash are the same item, as far as a cache can tell.

Source

pub fn hashed(self) -> Self

This item with hash set to its RemoteItem::digest.

Source

pub fn within_bounds(self) -> Self

This item cut to the bounds: what a server keeps of one.

Trait Implementations§

Source§

impl Clone for RemoteItem

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RemoteItem

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RemoteItem

Source§

impl PartialEq for RemoteItem

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RemoteItem

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RemoteItem

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.