edl integration work

This commit is contained in:
Sundog Jones 2024-09-17 10:08:51 -04:00
parent 863d89b6bc
commit da339b3ddc

View File

@ -538,7 +538,9 @@
template_clone.firstElementChild.setAttribute('data-timestamp', current_timecode); template_clone.firstElementChild.setAttribute('data-timestamp', current_timecode);
const target = document.querySelector("#media_item_edl_outpoint_listitem"); const target = document.querySelector("#media_item_edl_outpoint_listitem");
const parent = document.querySelector("#media_item_edl_list"); const parent = document.querySelector("#media_item_edl_list");
parent.insertBefore(template_clone, target); parent.insertBefore(template_clone, target);
parent.setAttribute("data-edl-id", edl_id);
parent.setAttribute("data-edl-name", edl_name);
}); });
sort_inserts(); sort_inserts();
} }
@ -559,7 +561,7 @@
} }
}); });
}); });
const edl_insert_button = document.getElementById("media_item_edl_add_insert_button"); const edl_insert_button = document.getElementById("media_item_edl_add_insert_button");
edl_insert_button.addEventListener("click", (e) => { edl_insert_button.addEventListener("click", (e) => {
e.preventDefault(); e.preventDefault();
@ -586,6 +588,9 @@
btn.addEventListener("click", jumpHandler); btn.addEventListener("click", jumpHandler);
}); });
}); });
console.dir(document.querySelector("#media_item_edl_list"));
const edl_save_button = document.getElementById("media_item_edl_save_button"); const edl_save_button = document.getElementById("media_item_edl_save_button");
edl_save_button.addEventListener("click", (e) => { edl_save_button.addEventListener("click", (e) => {
e.preventDefault(); e.preventDefault();
@ -599,6 +604,7 @@
edl_definition.outpoint = outpoint || document.querySelector("#media_library_details > .media_item_details").getAttribute("data-duration"); edl_definition.outpoint = outpoint || document.querySelector("#media_library_details > .media_item_details").getAttribute("data-duration");
edl_definition.inserts = []; edl_definition.inserts = [];
const list_parent = document.querySelector("#media_item_edl_list"); const list_parent = document.querySelector("#media_item_edl_list");
const current_items = list_parent.querySelectorAll("li.media_item_edl_insert"); const current_items = list_parent.querySelectorAll("li.media_item_edl_insert");
current_items.forEach((insertPoint) => { current_items.forEach((insertPoint) => {
edl_definition.inserts.push(insertPoint.getAttribute("data-timestamp")); edl_definition.inserts.push(insertPoint.getAttribute("data-timestamp"));