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

[pluralsight] "--all-subs" parameter to return all available subs

This commit is contained in:
Jaime Bergas Laborda 2020-04-17 15:09:44 +01:00
parent 585f8f6cd0
commit f75cf01dd8

View File

@ -422,9 +422,9 @@ query viewClip {
clip.get('duration')) or parse_duration(clip.get('formattedDuration'))
available_languages = [language['code'] for language in course['translationLanguages']]
requested_languages = self._downloader.params['subtitleslangs']
languages_to_retrieve = set(available_languages).intersection(requested_languages)
languages_to_retrieve = available_languages if self._downloader.params['allsubtitles'] \
else set(available_languages).intersection(self._downloader.params['subtitleslangs'])
subtitles = self.extract_subtitles(
author, clip_idx, clip.get('clipId'), languages_to_retrieve, name, duration, display_id)