From 9ec150b5461cc59eda93c5d3b3199fd97809972d Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 27 May 2016 09:24:02 -0600 Subject: LinGui: add source title dict to queue By adding the title to the queue entry, all necessary information for displaying queued job is present in the queue entry. So I no longer need hackish "Description" key in job audio and subtitle lists. --- gtk/src/audiohandler.c | 56 -------------------------------------------------- 1 file changed, 56 deletions(-) (limited to 'gtk/src/audiohandler.c') diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 9cf879871..8e434964f 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -69,26 +69,6 @@ ghb_sanitize_audio_settings(GhbValue *settings, GhbValue *asettings) bitrate = ghb_dict_get_int(asettings, "Bitrate"); quality = ghb_dict_get_double(asettings, "Quality"); sr = ghb_dict_get_int(asettings, "Samplerate"); - val = ghb_dict_get(asettings, "Description"); - if (val == NULL) - { - int title_id, track; - const hb_title_t *title; - hb_audio_config_t *aconfig; - - title_id = ghb_dict_get_int(settings, "title"); - title = ghb_lookup_title(title_id, NULL); - track = ghb_dict_get_int(asettings, "Track"); - aconfig = ghb_get_audio_info(title, track); - if (aconfig != NULL) - { - char *desc; - desc = g_strdup_printf("%d - %s", track + 1, - aconfig->lang.description); - ghb_dict_set_string(asettings, "Description", desc); - g_free(desc); - } - } val = ghb_dict_get(asettings, "QualityEnable"); if (val == NULL) { @@ -1090,25 +1070,6 @@ audio_track_changed_cb(GtkWidget *widget, signal_user_data_t *ud) audio_deps(ud, asettings, widget); ghb_audio_list_refresh_selected(ud); ghb_live_reset(ud); - - // Update the track description used by the queue - int title_id, titleindex; - const hb_title_t *title; - int track; - hb_audio_config_t *aconfig; - - title_id = ghb_dict_get_int(ud->settings, "title"); - title = ghb_lookup_title(title_id, &titleindex); - track = ghb_dict_get_int(ud->settings, "AudioTrack"); - aconfig = ghb_get_audio_info(title, track); - if (aconfig != NULL) - { - char *desc; - desc = g_strdup_printf("%d - %s", track + 1, - aconfig->lang.description); - ghb_dict_set_string(asettings, "Description", desc); - g_free(desc); - } } } @@ -1393,25 +1354,8 @@ static void audio_add_to_settings(GhbValue *settings, GhbValue *asettings) { GhbValue *audio_list; - int title_id; - const hb_title_t *title; - gint titleindex; - hb_audio_config_t *aconfig; - title_id = ghb_dict_get_int(settings, "title"); - title = ghb_lookup_title(title_id, &titleindex); audio_list = ghb_get_job_audio_list(settings); - - int track = ghb_dict_get_int(asettings, "Track"); - aconfig = ghb_get_audio_info(title, track); - if (aconfig != NULL) - { - char *desc; - desc = g_strdup_printf("%d - %s", track + 1, aconfig->lang.description); - ghb_dict_set_string(asettings, "Description", desc); - g_free(desc); - } - ghb_array_append(audio_list, asettings); } -- cgit v1.2.3