fix: use u32 for stream duration

This commit is contained in:
ThetaDev 2022-11-03 11:54:23 +01:00
parent be0306e234
commit 57abab112f
3 changed files with 5 additions and 5 deletions

View file

@ -73,7 +73,7 @@ pub(crate) struct Format {
pub width: Option<u32>,
pub height: Option<u32>,
#[serde_as(as = "Option<JsonString>")]
pub approx_duration_ms: Option<u64>,
pub approx_duration_ms: Option<u32>,
#[serde_as(as = "Option<crate::serializer::Range>")]
pub index_range: Option<Range<u32>>,

View file

@ -506,7 +506,7 @@ fn map_comment(
.accessibility_data,
&mut warnings,
),
reply_count: c.reply_count,
reply_count: c.reply_count as u32,
replies: replies
.map(|items| Paginator::new(Some(c.reply_count), items, reply_ctoken))
.unwrap_or_default(),

View file

@ -168,7 +168,7 @@ pub struct VideoStream {
pub index_range: Option<Range<u32>>,
pub init_range: Option<Range<u32>>,
// Video duration in milliseconds
pub duration_ms: Option<u64>,
pub duration_ms: Option<u32>,
/// Video width in pixels
pub width: u32,
/// Video height in pixels
@ -205,7 +205,7 @@ pub struct AudioStream {
pub index_range: Option<Range<u32>>,
pub init_range: Option<Range<u32>>,
// Audio duration in milliseconds
pub duration_ms: Option<u64>,
pub duration_ms: Option<u32>,
/// MIME file type
pub mime: String,
/// Audio file format
@ -652,7 +652,7 @@ pub struct Comment {
/// Number of comment likes
pub like_count: Option<u32>,
/// Number of replies
pub reply_count: u64,
pub reply_count: u32,
/// Paginator to fetch comment replies
pub replies: Paginator<Comment>,
/// Is the comment from the channel owner?