浏览代码

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

TIANYONG 7 月之前
父节点
当前提交
6375b98048
共有 1 个文件被更改,包括 3 次插入0 次删除
  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)
     }