소스 검색

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

TIANYONG 8 달 전
부모
커밋
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)
     }