mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-02-04 09:40:08 +09:00
Only need to generate flat_list once per playlist
This commit is contained in:
parent
218365d9f5
commit
1487c0d868
@ -50,14 +50,6 @@ class DigitalConcertHallIE(InfoExtractor):
|
|||||||
'Accept-Language': language})
|
'Accept-Language': language})
|
||||||
embedded = vid_info_dict.get('_embedded')
|
embedded = vid_info_dict.get('_embedded')
|
||||||
|
|
||||||
entries = []
|
|
||||||
for key in playlist_dict:
|
|
||||||
self.debug_out("key: " + key)
|
|
||||||
m3u8_url = playlist_dict.get(key)[0].get('url')
|
|
||||||
self.debug_out("key url: " + m3u8_url)
|
|
||||||
formats = self._extract_m3u8_formats(
|
|
||||||
m3u8_url, key, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)
|
|
||||||
self.debug_out(formats)
|
|
||||||
flat_list = []
|
flat_list = []
|
||||||
for embed_type in embedded:
|
for embed_type in embedded:
|
||||||
for item in embedded.get(embed_type):
|
for item in embedded.get(embed_type):
|
||||||
@ -66,6 +58,15 @@ class DigitalConcertHallIE(InfoExtractor):
|
|||||||
else:
|
else:
|
||||||
item['is_interview'] = 0
|
item['is_interview'] = 0
|
||||||
flat_list.append(item)
|
flat_list.append(item)
|
||||||
|
|
||||||
|
entries = []
|
||||||
|
for key in playlist_dict:
|
||||||
|
self.debug_out("key: " + key)
|
||||||
|
m3u8_url = playlist_dict.get(key)[0].get('url')
|
||||||
|
self.debug_out("key url: " + m3u8_url)
|
||||||
|
formats = self._extract_m3u8_formats(
|
||||||
|
m3u8_url, key, 'mp4', 'm3u8_native', m3u8_id='hls', fatal=False)
|
||||||
|
self.debug_out(formats)
|
||||||
vid_info = [x for x in flat_list if x.get('id') == key][0]
|
vid_info = [x for x in flat_list if x.get('id') == key][0]
|
||||||
if vid_info.get('is_interview') == 1:
|
if vid_info.get('is_interview') == 1:
|
||||||
title = "Interview - " + vid_info.get('title', "unknown interview title")
|
title = "Interview - " + vid_info.get('title', "unknown interview title")
|
||||||
|
Loading…
Reference in New Issue
Block a user