pub enum MediaKind {
Show 14 variants
Track,
Album,
Artist,
Playlist,
Movie,
Series,
Season,
Episode,
Person,
Channel,
Folder,
LiveChannel,
ChannelItem,
Other,
}Expand description
The kind of a media item — provider-neutral classification.
Replaces the stringly-typed item_type that carried Jellyfin’s vocabulary
("Audio", "MusicAlbum", …) across the boundary. A closed enum means a
typo or an unhandled kind is a compile error on the frontend, not a silent
runtime miss across ~127 comparison sites.
Variants§
Track
Album
Artist
Playlist
Movie
Series
Season
Episode
Person
Channel
A channel container the user drills into (Jellyfin Channel).
Folder
LiveChannel
A live TV channel — playable, but a live stream with no seekable
timeline (no resume/seek). Jellyfin TvChannel/LiveTvChannel.
ChannelItem
A playable leaf inside a channel (Jellyfin ChannelFolderItem that is
not itself a folder) — e.g. a plugin-channel VOD item that has no
dedicated item type but carries its own media streams. Playable and
seekable, unlike LiveChannel. Distinct from Channel (the container)
and from Other so the UI can route it to playback.
Other
A kind we do not model explicitly. Reached only for provider item types
that map to nothing meaningful; consumers treat it like an opaque
container. The mapping must be total — it never panics — so this is the
safe sink for unknown strings. Also the Default, so a defaulted
MediaItem (see the dual-carry migration) is inert rather than a lie.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MediaKind
impl<'de> Deserialize<'de> for MediaKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl NamedType for MediaKind
impl NamedType for MediaKind
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl Type for MediaKind
impl Type for MediaKind
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.impl Copy for MediaKind
impl Eq for MediaKind
impl StructuralPartialEq for MediaKind
Auto Trait Implementations§
impl Freeze for MediaKind
impl RefUnwindSafe for MediaKind
impl Send for MediaKind
impl Sync for MediaKind
impl Unpin for MediaKind
impl UnsafeUnpin for MediaKind
impl UnwindSafe for MediaKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
DataType]. Read more