mirror of
https://github.com/occ-ai/obs-localvocal
synced 2024-11-07 18:57:14 +00:00
lint
This commit is contained in:
parent
11a51e7512
commit
0fb43fd42a
@ -228,8 +228,7 @@ void transcription_filter_update(void *data, obs_data_t *s)
|
||||
|
||||
if (strcmp(new_text_source_name, "none") == 0 ||
|
||||
strcmp(new_text_source_name, "(null)") == 0 ||
|
||||
strcmp(new_text_source_name, "text_file") == 0 ||
|
||||
strlen(new_text_source_name) == 0) {
|
||||
strcmp(new_text_source_name, "text_file") == 0 || strlen(new_text_source_name) == 0) {
|
||||
// new selected text source is not valid, release the old one
|
||||
if (gf->text_source) {
|
||||
if (!gf->text_source_mutex) {
|
||||
@ -498,16 +497,21 @@ obs_properties_t *transcription_filter_properties(void *data)
|
||||
// Add text sources
|
||||
obs_enum_sources(add_sources_to_list, subs_output);
|
||||
|
||||
obs_properties_add_path(ppts, "subtitle_output_filename", "Output filename", OBS_PATH_FILE_SAVE, "Text (*.txt)", NULL);
|
||||
obs_properties_add_path(ppts, "subtitle_output_filename", "Output filename",
|
||||
OBS_PATH_FILE_SAVE, "Text (*.txt)", NULL);
|
||||
|
||||
obs_property_set_modified_callback(subs_output, [](obs_properties_t *props, obs_property_t *property, obs_data_t *settings) {
|
||||
obs_property_set_modified_callback(subs_output, [](obs_properties_t *props,
|
||||
obs_property_t *property,
|
||||
obs_data_t *settings) {
|
||||
const char *new_output = obs_data_get_string(settings, "subtitle_sources");
|
||||
if (strcmp(new_output, "text_file") == 0) {
|
||||
// Show the output filename selection input
|
||||
obs_property_set_visible(obs_properties_get(props, "subtitle_output_filename"), true);
|
||||
obs_property_set_visible(
|
||||
obs_properties_get(props, "subtitle_output_filename"), true);
|
||||
} else {
|
||||
// Hide the output filename selection input
|
||||
obs_property_set_visible(obs_properties_get(props, "subtitle_output_filename"), false);
|
||||
obs_property_set_visible(
|
||||
obs_properties_get(props, "subtitle_output_filename"), false);
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user