+ subtitles = {}
+ captions = source.get('captionsAvailableLanguages')
+ if isinstance(captions, dict):
+ for lang, subtitle_url in captions.items():
+ subtitle_url = url_or_none(subtitle_url)
+ if lang != 'none' and subtitle_url:
+ subtitles.setdefault(lang, []).append({'url': subtitle_url})
+