From 563e0bf82a84d2829ef4745dbaf23344e772fadb Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sun, 10 Jul 2022 16:51:28 +0530 Subject: [PATCH] Fix rounding of integers in format table --- yt_dlp/YoutubeDL.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index b669dfb27..9408d5e59 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3542,17 +3542,17 @@ def simplified_codec(f, field): self._format_out(format_field(f, 'format_id'), self.Styles.ID), format_field(f, 'ext'), format_field(f, func=self.format_resolution, ignore=('audio only', 'images')), - format_field(f, 'fps', '\t%d'), + format_field(f, 'fps', '\t%d', func=round), format_field(f, 'dynamic_range', '%s', ignore=(None, 'SDR')).replace('HDR', ''), delim, format_field(f, 'filesize', ' \t%s', func=format_bytes) + format_field(f, 'filesize_approx', '~\t%s', func=format_bytes), - format_field(f, 'tbr', '\t%dk'), + format_field(f, 'tbr', '\t%dk', func=round), shorten_protocol_name(f.get('protocol', '')), delim, simplified_codec(f, 'vcodec'), - format_field(f, 'vbr', '\t%dk'), + format_field(f, 'vbr', '\t%dk', func=round), simplified_codec(f, 'acodec'), - format_field(f, 'abr', '\t%dk'), + format_field(f, 'abr', '\t%dk', func=round), format_field(f, 'asr', '\t%s', func=format_decimal_suffix), join_nonempty( self._format_out('UNSUPPORTED', 'light red') if f.get('ext') in ('f4f', 'f4m') else None,