v1 transcoding
This commit is contained in:
+21
-2
@@ -173,7 +173,7 @@ impl JellyfinClient {
|
||||
("Recursive", recursive),
|
||||
("StartIndex", &start_index.to_string()),
|
||||
("Limit", &limit.to_string()),
|
||||
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber,RunTimeTicks,Genres,Studios,Overview,SeriesName,Album,AlbumArtist,Artists"),
|
||||
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber,RunTimeTicks,Genres,Studios,Overview,SeriesName,Album,AlbumArtist,Artists,UserData"),
|
||||
("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,RunTimeTicks,Genres,Studios,Overview,SeriesName,Album,AlbumArtist,Artists"),
|
||||
("Fields", "PrimaryImageAspectRatio,SortName,ProductionYear,IndexNumber,ParentIndexNumber,RunTimeTicks,Genres,Studios,Overview,SeriesName,Album,AlbumArtist,Artists,UserData"),
|
||||
])
|
||||
.send()
|
||||
.map_err(|e| format!("request failed: {e}"))?;
|
||||
@@ -322,6 +322,22 @@ pub struct JfStudio {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct JfUserData {
|
||||
#[serde(rename = "Played")]
|
||||
pub played: Option<bool>,
|
||||
|
||||
#[serde(rename = "PlaybackPositionTicks")]
|
||||
pub playback_position_ticks: Option<i64>,
|
||||
|
||||
#[serde(rename = "PlayedPercentage")]
|
||||
pub played_percentage: Option<f64>,
|
||||
|
||||
#[serde(rename = "UnplayedItemCount")]
|
||||
pub unplayed_item_count: Option<i64>,
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct JfItem {
|
||||
#[serde(rename = "Id")]
|
||||
@@ -362,6 +378,9 @@ pub struct JfItem {
|
||||
|
||||
#[serde(rename = "Artists", default)]
|
||||
pub artists: Vec<String>,
|
||||
|
||||
#[serde(rename = "UserData")]
|
||||
pub user_data: Option<JfUserData>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user