fix: synchronized recording format

This commit is contained in:
ihmily
2025-08-22 16:54:48 +08:00
parent e65e4e81e9
commit b4fd7c2006

View File

@@ -76,9 +76,14 @@ class RecordingDialog:
value=default_record_type,
on_change=update_format_options
)
if default_record_type == "video":
record_formats = VideoFormat.get_formats()
else:
record_formats = AudioFormat.get_formats()
record_format_field = ft.Dropdown(
label=self._["select_record_format"],
options=[ft.dropdown.Option(i) for i in VideoFormat.get_formats()],
options=[ft.dropdown.Option(i) for i in record_formats],
border_radius=5,
filled=False,
value=default_record_format,