mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-26 02:25:55 +00:00
cleanup
Authored by: bashonly
This commit is contained in:
parent
d98a48e6c4
commit
11dfa446ec
@ -1022,7 +1022,7 @@ class TwitchStreamIE(TwitchPlaylistBaseIE):
|
|||||||
'id': 'v' + video_id,
|
'id': 'v' + video_id,
|
||||||
'url': f'https://www.twitch.tv/videos/{video_id}',
|
'url': f'https://www.twitch.tv/videos/{video_id}',
|
||||||
'title': node.get('title'),
|
'title': node.get('title'),
|
||||||
'timestamp': unified_timestamp(node.get('publishedAt')),
|
'timestamp': unified_timestamp(node.get('publishedAt')) or 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
@ -1063,7 +1063,7 @@ class TwitchStreamIE(TwitchPlaylistBaseIE):
|
|||||||
|
|
||||||
if self.get_param('live_from_start'):
|
if self.get_param('live_from_start'):
|
||||||
entry = next(self._entries(channel_name, None, 'time'), None)
|
entry = next(self._entries(channel_name, None, 'time'), None)
|
||||||
if entry and timestamp <= (entry.get('timestamp') or 0):
|
if entry and entry['timestamp'] >= timestamp:
|
||||||
return entry
|
return entry
|
||||||
self.report_warning('Unable to extract associated VOD; cannot download live from start')
|
self.report_warning('Unable to extract associated VOD; cannot download live from start')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user