diff options
-rw-r--r-- | gtk/src/callbacks.c | 16 | ||||
-rw-r--r-- | gtk/src/internal_defaults.json | 1 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 72bd33a6f..6e7a41db1 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -566,12 +566,26 @@ check_name_template(signal_user_data_t *ud, const char *str) static void set_destination_settings(signal_user_data_t *ud, GhbValue *settings) { - const gchar *extension; + const gchar *extension, *dest_file; gchar *filename; extension = get_extension(ud, settings); g_debug("set_destination_settings"); + dest_file = ghb_dict_get_string(ud->settings, "dest_file"); + if (dest_file == NULL) + { + // Initialize destination filename if it has no value yet. + // If auto-naming is disabled, this will be the default filename. + GString *str = g_string_new(""); + const gchar *vol_name; + vol_name = ghb_dict_get_string(settings, "volume_label"); + g_string_append_printf(str, "%s", vol_name); + g_string_append_printf(str, ".%s", extension); + filename = g_string_free(str, FALSE); + ghb_dict_set_string(settings, "dest_file", filename); + g_free(filename); + } if (ghb_dict_get_bool(ud->prefs, "auto_name")) { GString *str = g_string_new(""); diff --git a/gtk/src/internal_defaults.json b/gtk/src/internal_defaults.json index 285d982b0..6bf22e128 100644 --- a/gtk/src/internal_defaults.json +++ b/gtk/src/internal_defaults.json @@ -30,7 +30,6 @@ "angle": 1, "autoscale": true, "dest_dir": "", - "dest_file": "new_video.mp4", "end_point": 100.0, "MetaName": "", "MetaArtist": "", |