From da339b3ddca343c3c63585c997d6ac3d243f7dd4 Mon Sep 17 00:00:00 2001 From: Sundog Date: Tue, 17 Sep 2024 10:08:51 -0400 Subject: [PATCH] edl integration work --- layout.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/layout.html b/layout.html index b87df76..dd46bf1 100755 --- a/layout.html +++ b/layout.html @@ -538,7 +538,9 @@ template_clone.firstElementChild.setAttribute('data-timestamp', current_timecode); const target = document.querySelector("#media_item_edl_outpoint_listitem"); 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(); } @@ -559,7 +561,7 @@ } }); }); - + const edl_insert_button = document.getElementById("media_item_edl_add_insert_button"); edl_insert_button.addEventListener("click", (e) => { e.preventDefault(); @@ -586,6 +588,9 @@ btn.addEventListener("click", jumpHandler); }); }); + + console.dir(document.querySelector("#media_item_edl_list")); + const edl_save_button = document.getElementById("media_item_edl_save_button"); edl_save_button.addEventListener("click", (e) => { e.preventDefault(); @@ -599,6 +604,7 @@ edl_definition.outpoint = outpoint || document.querySelector("#media_library_details > .media_item_details").getAttribute("data-duration"); edl_definition.inserts = []; const list_parent = document.querySelector("#media_item_edl_list"); + const current_items = list_parent.querySelectorAll("li.media_item_edl_insert"); current_items.forEach((insertPoint) => { edl_definition.inserts.push(insertPoint.getAttribute("data-timestamp"));