diff options
author | John Stebbins <[email protected]> | 2016-05-24 15:04:56 -0600 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-05-24 15:05:56 -0600 |
commit | e7578bb85c3cfebc65e69c33bbb4e123ae01a11d (patch) | |
tree | 1fa9bab9f7cd8d7034e6c11e94223d47995bbcd5 /gtk/src | |
parent | 12ffa792a5ec30ae3c2b0b90f18ce6d80d3cfd1b (diff) |
LinGui: fix audio and subtitle descriptions in queue
... When "Add Multiple" is used.
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/audiohandler.c | 13 | ||||
-rw-r--r-- | gtk/src/audiohandler.h | 2 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 2 | ||||
-rw-r--r-- | gtk/src/subtitlehandler.c | 16 | ||||
-rw-r--r-- | gtk/src/subtitlehandler.h | 1 |
5 files changed, 33 insertions, 1 deletions
diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index a40f6166d..9cf879871 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -446,6 +446,19 @@ static char * get_quality_string(int codec, gdouble quality) return s_quality; } +void ghb_sanitize_audio_track_settings(GhbValue *settings) +{ + int ii; + GhbValue *alist = ghb_get_job_audio_list(settings); + int count = ghb_array_len(alist); + + for (ii = 0; ii < count; ii++) + { + GhbValue *asettings = ghb_array_get(alist, ii); + ghb_sanitize_audio_settings(settings, asettings); + } +} + void ghb_sanitize_audio_tracks(signal_user_data_t *ud) { int ii; diff --git a/gtk/src/audiohandler.h b/gtk/src/audiohandler.h index d10e55aec..fb8e3e095 100644 --- a/gtk/src/audiohandler.h +++ b/gtk/src/audiohandler.h @@ -30,7 +30,7 @@ GhbValue *ghb_get_audio_settings(GhbValue *settings); GhbValue *ghb_get_audio_list(GhbValue *settings); -void ghb_sanitize_audio_tracks(signal_user_data_t *ud); +void ghb_sanitize_audio_track_settings(GhbValue *settings); const gchar* ghb_get_user_audio_lang(GhbValue *settings, const hb_title_t *title, gint track); void ghb_audio_list_refresh_selected(signal_user_data_t *ud); gint ghb_select_audio_codec(gint mux, hb_audio_config_t *aconfig, gint acodec, gint fallback_acodec, gint copy_mask); diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 526f76e18..c73820a41 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -1936,6 +1936,8 @@ set_title_settings(signal_user_data_t *ud, GhbValue *settings) update_meta(settings, "LongDescription", title->metadata->long_description); } + ghb_sanitize_audio_track_settings(settings); + ghb_sanitize_subtitle_track_settings(settings); } set_destination_settings(ud, settings); diff --git a/gtk/src/subtitlehandler.c b/gtk/src/subtitlehandler.c index 52d6517c6..c012d4a65 100644 --- a/gtk/src/subtitlehandler.c +++ b/gtk/src/subtitlehandler.c @@ -409,6 +409,22 @@ subtitle_set_track_description(GhbValue *settings, GhbValue *subsettings) g_free(desc); } +void ghb_sanitize_subtitle_track_settings(GhbValue *settings) +{ + int ii; + GhbValue *slist = ghb_get_job_subtitle_list(settings); + int count = ghb_array_len(slist); + + GhbValue *subtitle_search = ghb_get_job_subtitle_search(settings); + subtitle_set_track_description(settings, subtitle_search); + for (ii = 0; ii < count; ii++) + { + GhbValue *subsettings = ghb_array_get(slist, ii); + subtitle_set_track_description(settings, subsettings); + } +} + + static GhbValue* subtitle_add_track( signal_user_data_t *ud, GhbValue *settings, diff --git a/gtk/src/subtitlehandler.h b/gtk/src/subtitlehandler.h index 7c6e84b00..7f723a024 100644 --- a/gtk/src/subtitlehandler.h +++ b/gtk/src/subtitlehandler.h @@ -36,6 +36,7 @@ void ghb_subtitle_defaults_to_ui(signal_user_data_t *ud); void ghb_subtitle_title_change(signal_user_data_t *ud, gboolean show); void ghb_subtitle_set_pref_lang(GhbValue *settings); void ghb_clear_subtitle_selection(GtkBuilder *builder); +void ghb_sanitize_subtitle_track_settings(GhbValue *settings); GhbValue *ghb_get_subtitle_list(GhbValue *settings); GhbValue *ghb_get_subtitle_settings(GhbValue *settings); |