Only decode text direction entities in Sub files (cont.)
Already did this for HLS, but somehow forgot to for DASH and direct URLs.
This commit is contained in:
@@ -400,7 +400,6 @@ class HLS:
|
||||
if isinstance(track, Subtitle):
|
||||
segment_data = try_ensure_utf8(segment_file_path.read_bytes())
|
||||
if track.codec not in (Subtitle.Codec.fVTT, Subtitle.Codec.fTTML):
|
||||
# decode text direction entities or SubtitleEdit's /ReverseRtlStartEnd won't work
|
||||
segment_data = segment_data.decode("utf8"). \
|
||||
replace("‎", html.unescape("‎")). \
|
||||
replace("‏", html.unescape("‏")). \
|
||||
|
||||
Reference in New Issue
Block a user