Explorar o código

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

TIANYONG hai 8 meses
pai
achega
6375b98048
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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)
     }