1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-30 04:08:01 +01:00

Refactored vars to be easier to understand

This commit is contained in:
Ben Bryant 2020-04-20 00:38:10 -07:00
parent 460d7aef86
commit 157cf0bb37

View File

@ -165,9 +165,10 @@ class FunimationIE(InfoExtractor):
text_tracks = self._parse_json(text_tracks_json_string, display_id, js_to_json, fatal=False) or [] text_tracks = self._parse_json(text_tracks_json_string, display_id, js_to_json, fatal=False) or []
subtitles = {} subtitles = {}
for text_track in text_tracks: for text_track in text_tracks:
data = {'url': text_track['src']} url_element = {'url': text_track['src']}
if text_track['language'] in subtitles: language = text_track.get('language')
subtitles[text_track['language']].append(data) if language in subtitles:
subtitles[language].append(url_element)
else: else:
subtitles[text_track['language']] = [data] subtitles[language] = [url_element]
return subtitles return subtitles