mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 22:55:18 +00:00 
			
		
		
		
	[ie/sbs] Fix subtitles extraction (#12785)
Closes #12783 Authored by: bashonly
This commit is contained in:
		| @@ -122,6 +122,15 @@ class SBSIE(InfoExtractor): | ||||
|         if traverse_obj(media, ('partOfSeries', {dict})): | ||||
|             media['epName'] = traverse_obj(media, ('title', {str})) | ||||
| 
 | ||||
|         # Need to set different language for forced subs or else they have priority over full subs | ||||
|         fixed_subtitles = {} | ||||
|         for lang, subs in subtitles.items(): | ||||
|             for sub in subs: | ||||
|                 fixed_lang = lang | ||||
|                 if sub['url'].lower().endswith('_fe.vtt'): | ||||
|                     fixed_lang += '-forced' | ||||
|                 fixed_subtitles.setdefault(fixed_lang, []).append(sub) | ||||
| 
 | ||||
|         return { | ||||
|             'id': video_id, | ||||
|             **traverse_obj(media, { | ||||
| @@ -151,6 +160,6 @@ class SBSIE(InfoExtractor): | ||||
|                 }), | ||||
|             }), | ||||
|             'formats': formats, | ||||
|             'subtitles': subtitles, | ||||
|             'subtitles': fixed_subtitles, | ||||
|             'uploader': 'SBSC', | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bashonly
					bashonly