Skip to content

Commit

Permalink
make changes for sinusbot to new release
Browse files Browse the repository at this point in the history
  • Loading branch information
denizkoekden committed Sep 24, 2023
1 parent c54ddfb commit 0fbdfe1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test_InfoExtractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def test_parse_m3u8_formats(self):
'acodec': 'mp4a.40.2',
'audio_ext': 'mp4',
'video_ext': 'none',
'abr': 41.457,
'abr': 41,
}, {
'format_id': '263',
'format_index': None,
Expand Down Expand Up @@ -1271,7 +1271,7 @@ def test_parse_mpd_formats(self):
'protocol': 'http_dash_segments',
'audio_ext': 'm4a',
'video_ext': 'none',
'abr': 128.001,
'abr': 128,
}, {
'format_id': 'video=100000',
'manifest_url': 'https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/3144/files/17/07/672975/3144-kZT4LWMQw6Rh7Kpd.ism/manifest.mpd',
Expand Down
1 change: 1 addition & 0 deletions yt_dlp/extractor/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,7 @@ def build_stream_name():
if mobj:
abr, vbr = mobj.groups()
abr, vbr = float_or_none(abr, 1000), float_or_none(vbr, 1000)
abr = int(abr)
f.update({
'vbr': vbr,
'abr': abr,
Expand Down
2 changes: 1 addition & 1 deletion yt_dlp/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -3818,7 +3818,7 @@ def build_fragments(f):
video_id=video_id, only_once=True)
throttled = True

tbr = float_or_none(fmt.get('averageBitrate') or fmt.get('bitrate'), 1000)
tbr = int_or_none(fmt.get('averageBitrate') or fmt.get('bitrate'), 1000)
language_preference = (
10 if audio_track.get('audioIsDefault') and 10
else -10 if 'descriptive' in (audio_track.get('displayName') or '').lower() and -10
Expand Down

0 comments on commit 0fbdfe1

Please sign in to comment.