13
0

AAF: set session name from AAF filename instead of AAF composition name

https://github.com/agfline/LibAAF/issues/5#issuecomment-1952193515
This commit is contained in:
agfline 2024-05-10 13:16:36 +02:00 committed by Robin Gareus
parent 7b75748299
commit fc1377ae46
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -465,15 +465,7 @@ ARDOUR_UI::new_session_from_aaf (string const& aaf, string const& target_dir, st
return -1; return -1;
} }
/* extract or set session name */ snapshot = legalize_for_universal_path (basename_nosuffix (aaf));
if (aafi->compositionName && aafi->compositionName[0] != 0x00) {
string compositionName = string (aafi->compositionName);
snapshot = laaf_util_clean_filename (&compositionName[0]);
} else {
snapshot = basename_nosuffix (aaf);
}
snapshot = legalize_for_universal_path (snapshot);
path = Glib::build_filename (target_dir, snapshot); path = Glib::build_filename (target_dir, snapshot);
if (Glib::file_test (path, Glib::FILE_TEST_EXISTS)) { if (Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {