domain: flip catalog frontend off Jellyfin item-type strings (phase 2a)
Migrate catalog MediaItem consumers from stringly item.type ("Audio",
"MusicAlbum", …) to the neutral item.kind enum across all classification
logic: home, library detail, player routing, artist/person/related/genre
components, tv store.
Model refinements found during migration (each a real distinction the
flat item_type collapsed):
- MediaKind::LiveChannel — live TV (playable, non-seekable) vs
- MediaKind::ChannelItem — channel VOD leaf (playable, seekable) vs
- MediaKind::Channel — channel container (drill-in).
TvChannel->LiveChannel, non-folder ChannelFolderItem->ChannelItem.
RelatedItemsSection and GenreTags props migrated from Jellyfin type
strings to MediaKind; MediaKind re-exported from api/types.
Deferred by design: display {item.type} text, ResultsCounter labels,
Person.type (role), stream.type (phase 4), and all runTimeTicks/tick math
(coupled to playbackPositionTicks — phase 3). Old fields still dual-carried
so nothing breaks.
Rust 456 + 7 domain tests, frontend 644 tests, check clean.
This commit is contained in:
+18
-1
@@ -1858,7 +1858,24 @@ imageId?: string | null; backdropImageTags?: string[] | null; parentBackdropImag
|
||||
* typo or an unhandled kind is a compile error on the frontend, not a silent
|
||||
* runtime miss across ~127 comparison sites.
|
||||
*/
|
||||
export type MediaKind = "track" | "album" | "artist" | "playlist" | "movie" | "series" | "season" | "episode" | "person" | "channel" | "folder" |
|
||||
export type MediaKind = "track" | "album" | "artist" | "playlist" | "movie" | "series" | "season" | "episode" | "person" |
|
||||
/**
|
||||
* A channel *container* the user drills into (Jellyfin `Channel`).
|
||||
*/
|
||||
"channel" | "folder" |
|
||||
/**
|
||||
* A live TV channel — playable, but a live stream with no seekable
|
||||
* timeline (no resume/seek). Jellyfin `TvChannel`/`LiveTvChannel`.
|
||||
*/
|
||||
"liveChannel" |
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
"channelItem" |
|
||||
/**
|
||||
* A kind we do not model explicitly. Reached only for provider item types
|
||||
* that map to nothing meaningful; consumers treat it like an opaque
|
||||
|
||||
@@ -14,6 +14,7 @@ export type {
|
||||
Library,
|
||||
LiveStreamInfo,
|
||||
MediaItem,
|
||||
MediaKind,
|
||||
MediaSource,
|
||||
MediaStream,
|
||||
Person,
|
||||
|
||||
Reference in New Issue
Block a user