better language
This commit is contained in:
@@ -60,8 +60,7 @@ def get_preferred_audio_stream_index(path: Path) -> int | None:
|
|||||||
"ffprobe",
|
"ffprobe",
|
||||||
"-v", "quiet",
|
"-v", "quiet",
|
||||||
"-print_format", "json",
|
"-print_format", "json",
|
||||||
"-show_entries", "stream=index,codec_type",
|
"-show_entries", "stream=index,codec_type:stream_tags=language",
|
||||||
"-show_entries", "stream_tags=language",
|
|
||||||
str(path),
|
str(path),
|
||||||
],
|
],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
@@ -85,7 +84,7 @@ def get_preferred_audio_stream_index(path: Path) -> int | None:
|
|||||||
audio_streams.append((idx, lang, raw))
|
audio_streams.append((idx, lang, raw))
|
||||||
if not audio_streams:
|
if not audio_streams:
|
||||||
return None
|
return None
|
||||||
dutch = ("nld", "dut", "nl")
|
dutch = ("nld", "dut", "nl", "dutch", "nederlands")
|
||||||
flemish = ("vls", "nl-be", "nlb")
|
flemish = ("vls", "nl-be", "nlb")
|
||||||
for idx, lang, raw in audio_streams:
|
for idx, lang, raw in audio_streams:
|
||||||
if lang in dutch or raw in dutch:
|
if lang in dutch or raw in dutch:
|
||||||
|
|||||||
Reference in New Issue
Block a user