Allow for multiple captions for each language
This may eventually be needed in future releases of PeerTube
This commit is contained in:
parent
66f07dcd41
commit
b31f3dc2dc
@ -497,9 +497,14 @@ class PeerTubeIE(InfoExtractor):
|
||||
caption_path = entry.get('captionPath')
|
||||
if language_id is not None and caption_path is not None:
|
||||
caption_url = 'https://%s%s' % (host, caption_path)
|
||||
subtitles[language_id] = [{
|
||||
'url': caption_url
|
||||
}]
|
||||
if language_id in subtitles:
|
||||
subtitles[language_id].append({
|
||||
'url': caption_url
|
||||
})
|
||||
else:
|
||||
subtitles[language_id] = [{
|
||||
'url': caption_url
|
||||
}]
|
||||
return subtitles
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
Loading…
x
Reference in New Issue
Block a user