diff options
author | metamuffin <metamuffin@disroot.org> | 2024-01-28 17:55:11 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-01-28 17:55:11 +0100 |
commit | 727be96686a2c6c5747b26be15933e11c9cab9c6 (patch) | |
tree | 817accf6c4965e814cc8736fdbd17b423fae0669 /common/src/impl.rs | |
parent | 5b587f2914908daa804bb643ac216001290077ab (diff) | |
download | jellything-727be96686a2c6c5747b26be15933e11c9cab9c6.tar jellything-727be96686a2c6c5747b26be15933e11c9cab9c6.tar.bz2 jellything-727be96686a2c6c5747b26be15933e11c9cab9c6.tar.zst |
clean up some code + subrip support?
Diffstat (limited to 'common/src/impl.rs')
-rw-r--r-- | common/src/impl.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/common/src/impl.rs b/common/src/impl.rs index 009b7c7..25cc47d 100644 --- a/common/src/impl.rs +++ b/common/src/impl.rs @@ -27,14 +27,19 @@ impl AssetRole { impl std::fmt::Display for SourceTrack { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let kspec = match &self.kind { - SourceTrackKind::Video { width, height, fps } => { - format!("Video: {width}x{height} {fps}fps ") + SourceTrackKind::Video { + width, height, fps, .. + } => { + format!("Video: {width}x{height} {}fps ", fps.unwrap_or(0.)) } SourceTrackKind::Audio { channels, sample_rate, bit_depth, - } => format!("Audio: {channels}ch {sample_rate}Hz {bit_depth}bits "), + } => format!( + "Audio: {channels}ch {sample_rate}Hz {}bits ", + bit_depth.unwrap_or(0) + ), SourceTrackKind::Subtitles => "Subtitles: ".to_string(), }; f.write_fmt(format_args!( |