fix: Marked videoCodecs as Option to resolve #38
This commit is contained in:
@@ -275,7 +275,7 @@ pub(in crate::handlers::radarr_handlers) mod utils {
|
||||
audio_stream_count: 1,
|
||||
video_bit_depth: 10,
|
||||
video_bitrate: 0,
|
||||
video_codec: "x265".to_owned(),
|
||||
video_codec: Some("x265".to_owned()),
|
||||
video_fps: Number::from_f64(23.976).unwrap(),
|
||||
resolution: "1920x804".to_owned(),
|
||||
run_time: "2:00:00".to_owned(),
|
||||
|
||||
@@ -297,7 +297,7 @@ pub(in crate::handlers::sonarr_handlers) mod utils {
|
||||
audio_stream_count: 1,
|
||||
video_bit_depth: 10,
|
||||
video_bitrate: 0,
|
||||
video_codec: "x265".to_owned(),
|
||||
video_codec: Some("x265".to_owned()),
|
||||
video_fps: Number::from_f64(23.976).unwrap(),
|
||||
resolution: "1920x1080".to_owned(),
|
||||
run_time: "23:51".to_owned(),
|
||||
|
||||
@@ -249,7 +249,7 @@ pub struct MediaInfo {
|
||||
pub video_bit_depth: i64,
|
||||
#[serde(deserialize_with = "super::from_i64")]
|
||||
pub video_bitrate: i64,
|
||||
pub video_codec: String,
|
||||
pub video_codec: Option<String>,
|
||||
#[derivative(Default(value = "Number::from(0)"))]
|
||||
pub video_fps: Number,
|
||||
pub resolution: String,
|
||||
|
||||
@@ -253,7 +253,7 @@ pub struct MediaInfo {
|
||||
pub video_bit_depth: i64,
|
||||
#[serde(deserialize_with = "super::from_i64")]
|
||||
pub video_bitrate: i64,
|
||||
pub video_codec: String,
|
||||
pub video_codec: Option<String>,
|
||||
#[derivative(Default(value = "Number::from(0)"))]
|
||||
pub video_fps: Number,
|
||||
pub resolution: String,
|
||||
|
||||
@@ -1300,7 +1300,7 @@ impl Network<'_, '_> {
|
||||
Runtime: {}",
|
||||
media_info.video_bit_depth,
|
||||
media_info.video_bitrate,
|
||||
media_info.video_codec,
|
||||
media_info.video_codec.unwrap_or_default(),
|
||||
media_info.video_fps.as_f64().unwrap(),
|
||||
media_info.resolution,
|
||||
media_info.scan_type,
|
||||
|
||||
@@ -4008,7 +4008,7 @@ mod test {
|
||||
audio_stream_count: 1,
|
||||
video_bit_depth: 10,
|
||||
video_bitrate: 0,
|
||||
video_codec: "x265".to_owned(),
|
||||
video_codec: Some("x265".to_owned()),
|
||||
video_fps: Number::from_f64(23.976).unwrap(),
|
||||
resolution: "1920x804".to_owned(),
|
||||
run_time: "2:00:00".to_owned(),
|
||||
|
||||
@@ -1408,7 +1408,7 @@ impl Network<'_, '_> {
|
||||
Subtitles: {}",
|
||||
media_info.video_bit_depth,
|
||||
media_info.video_bitrate,
|
||||
media_info.video_codec,
|
||||
media_info.video_codec.unwrap_or_default(),
|
||||
media_info.video_fps.as_f64().unwrap(),
|
||||
media_info.resolution,
|
||||
media_info.scan_type,
|
||||
|
||||
@@ -5670,7 +5670,7 @@ mod test {
|
||||
audio_stream_count: 1,
|
||||
video_bit_depth: 10,
|
||||
video_bitrate: 0,
|
||||
video_codec: "x265".to_owned(),
|
||||
video_codec: Some("x265".to_owned()),
|
||||
video_fps: Number::from_f64(23.976).unwrap(),
|
||||
resolution: "1920x1080".to_owned(),
|
||||
run_time: "23:51".to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user