info almost done

This commit is contained in:
2026-02-14 22:37:00 -06:00
parent 2893387372
commit 437053395b
2 changed files with 148 additions and 9 deletions
+32 -4
View File
@@ -173,7 +173,7 @@ impl JellyfinClient {
("Recursive", recursive),
("StartIndex", &start_index.to_string()),
("Limit", &limit.to_string()),
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber"),
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber,RunTimeTicks,Genres,Studios,Overview,SeriesName"),
("SortBy", sort_by),
("SortOrder", "Ascending"),
]);
@@ -226,7 +226,7 @@ impl JellyfinClient {
("UserId", user_id),
("StartIndex", &start_index.to_string()),
("Limit", &limit.to_string()),
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber"),
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber,RunTimeTicks,Genres,Studios,Overview,SeriesName"),
])
.send()
.map_err(|e| format!("request failed: {e}"))?;
@@ -316,6 +316,12 @@ pub struct PagedItems {
pub total: usize,
}
#[derive(Debug, Clone, Deserialize)]
pub struct JfStudio {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Debug, Clone, Deserialize)]
pub struct JfItem {
#[serde(rename = "Id")]
@@ -328,9 +334,25 @@ pub struct JfItem {
pub production_year: Option<i32>,
#[serde(rename = "IndexNumber")]
pub index_number: Option<i32>, // track # OR episode #
pub index_number: Option<i32>,
#[serde(rename = "ParentIndexNumber")]
pub parent_index_number: Option<i32>, // season # (for episodes)
pub parent_index_number: Option<i32>,
// ✅ add these
#[serde(rename = "RunTimeTicks")]
pub run_time_ticks: Option<i64>,
#[serde(rename = "Genres", default)]
pub genres: Vec<String>,
#[serde(rename = "Studios", default)]
pub studios: Vec<JfStudio>,
#[serde(rename = "Overview")]
pub overview: Option<String>,
#[serde(rename = "SeriesName")]
pub series_name: Option<String>,
}
#[derive(Deserialize)]
@@ -339,4 +361,10 @@ struct ItemsResponse {
items: Vec<JfItem>,
#[serde(rename = "TotalRecordCount")]
total_record_count: Option<usize>,
}
#[derive(Debug, Clone, Deserialize)]
pub struct StudioDto {
#[serde(rename = "Name")]
pub name: Option<String>,
}