1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-22 07:43:08 +00:00

make sure playerOffsetMs is positive

This commit is contained in:
siikamiika 2020-11-28 02:19:38 +02:00
parent 93201d50aa
commit ae6e4e25aa

View file

@ -61,7 +61,7 @@ class YoutubeLiveChatReplayFD(FragmentFD):
else: else:
url = ('https://www.youtube.com/live_chat_replay/get_live_chat_replay' url = ('https://www.youtube.com/live_chat_replay/get_live_chat_replay'
+ '?continuation={}'.format(continuation_id) + '?continuation={}'.format(continuation_id)
+ '&playerOffsetMs={}'.format(offset - 5000) + '&playerOffsetMs={}'.format(max(offset - 5000, 0))
+ '&hidden=false' + '&hidden=false'
+ '&pbj=1') + '&pbj=1')
success, raw_fragment = dl_fragment(url) success, raw_fragment = dl_fragment(url)