feat: enhance MediaItem with additional episode details and update ChannelInfo component

This commit is contained in:
2026-03-11 21:45:11 +01:00
parent d1122656f3
commit f6ff65094b
6 changed files with 93 additions and 15 deletions

View File

@@ -65,7 +65,7 @@ impl IMediaProvider for JellyfinMediaProvider {
let mut params: Vec<(&str, String)> = vec![
("Recursive", "true".into()),
("Fields", "Genres,Tags,RunTimeTicks,ProductionYear".into()),
("Fields", "Genres,Tags,RunTimeTicks,ProductionYear,Overview".into()),
];
if let Some(ct) = &filter.content_type {
@@ -198,12 +198,23 @@ struct JellyfinItem {
item_type: String,
#[serde(rename = "RunTimeTicks")]
run_time_ticks: Option<i64>,
#[serde(rename = "Overview")]
overview: Option<String>,
#[serde(rename = "Genres")]
genres: Option<Vec<String>>,
#[serde(rename = "ProductionYear")]
production_year: Option<u16>,
#[serde(rename = "Tags")]
tags: Option<Vec<String>>,
/// TV show name (episodes only)
#[serde(rename = "SeriesName")]
series_name: Option<String>,
/// Season number (episodes only)
#[serde(rename = "ParentIndexNumber")]
parent_index_number: Option<u32>,
/// Episode number within the season (episodes only)
#[serde(rename = "IndexNumber")]
index_number: Option<u32>,
}
// ============================================================================
@@ -238,8 +249,12 @@ fn map_jellyfin_item(item: JellyfinItem) -> Option<MediaItem> {
title: item.name,
content_type,
duration_secs,
description: item.overview,
genres: item.genres.unwrap_or_default(),
year: item.production_year,
tags: item.tags.unwrap_or_default(),
series_name: item.series_name,
season_number: item.parent_index_number,
episode_number: item.index_number,
})
}