if (title != NULL)
{
GhbValue *job_dict;
- char * source_name;
job_dict = hb_preset_job_init(ghb_scan_handle(), title_id, settings);
ghb_dict_set(settings, "Job", job_dict);
ghb_dict_set_int(settings, "source_width", title->geometry.width);
ghb_dict_set_int(settings, "source_height", title->geometry.height);
ghb_dict_set_string(settings, "source", title->path);
- source_name = ghb_create_source_label(title);
- ghb_dict_set_string(settings, "source_label", source_name);
- ghb_dict_set_string(settings, "volume", source_name);
+ ghb_dict_set_string(settings, "source_label",
+ ghb_create_source_label(title));
+ ghb_dict_set_string(settings, "volume",
+ ghb_create_volume_label(title));
int crop[4];
return source;
}
+gchar*
+ghb_create_volume_label(const hb_title_t * title)
+{
+ char * volname;
+
+ if (title != NULL && title->name != NULL && title->name[0] != 0)
+ {
+ volname = strdup(title->name);
+ if (title->type == HB_DVD_TYPE)
+ {
+ ghb_sanitize_volname(volname);
+ }
+ }
+ else
+ {
+ volname = g_strdup(_("No Title Found"));
+ }
+ return volname;
+}
+
gchar*
ghb_create_title_label(const hb_title_t *title)
{
int ghb_lookup_lang(const GhbValue *glang);
const iso639_lang_t* ghb_iso639_lookup_by_int(int idx);
void ghb_update_display_aspect_label(signal_user_data_t *ud);
-gchar* ghb_create_title_label(const hb_title_t *title);
// libhb lookup helpers
const hb_title_t* ghb_lookup_title(int title_id, int *index);
hb_handle_t* ghb_queue_handle(void);
hb_handle_t* ghb_live_handle(void);
void ghb_sanitize_volname(gchar *name);
+gchar* ghb_create_title_label(const hb_title_t *title);
gchar* ghb_create_source_label(const hb_title_t * title);
+gchar* ghb_create_volume_label(const hb_title_t * title);
#endif // _HBBACKEND_H_