1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +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 []
subtitles = {}
for text_track in text_tracks:
data = {'url': text_track['src']}
if text_track['language'] in subtitles:
subtitles[text_track['language']].append(data)
url_element = {'url': text_track['src']}
language = text_track.get('language')
if language in subtitles:
subtitles[language].append(url_element)
else:
subtitles[text_track['language']] = [data]
subtitles[language] = [url_element]
return subtitles