Browse Source

feat: 声轨名称添加自定义属性

TIANYONG 8 tháng trước cách đây
mục cha
commit
6375b98048
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      src/state.ts

+ 3 - 0
src/state.ts

@@ -1516,6 +1516,9 @@ function xmlToTracks(xmlString: string) {
   const partNames = Array.from(xmlParse.getElementsByTagName('part-name'));
   return partNames.reduce((arr: string[], item) => {
     const textContent = item?.textContent?.trim()
+    if (textContent?.toLocaleLowerCase() === "common") {
+      (window as any).HasCommonTrack = true;
+    }
     if (textContent != "COMMON" && textContent != "common" && textContent) {
       arr.push(textContent)
     }