Explorar el Código

feat: decode声轨名称

TIANYONG hace 2 días
padre
commit
38864e6475
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/state.ts

+ 2 - 1
src/state.ts

@@ -1503,7 +1503,8 @@ const getMusicInfo = async (res: any) => {
   let partIndexs = query["part-index"] ? query["part-index"].split(",") : ["-1"] // -1为partIndex没有值的时候
   // 如果传入的是part-name,需要将part-name转换成part-index
   if (query["part-name"]) {
-    let nameIdx = tracks.findIndex((item: any) => item == query["part-name"])
+    const partValue = decodeURIComponent(query["part-name"]) || ''
+    let nameIdx = tracks.findIndex((item: any) => item == partValue)
     partIndexs = [nameIdx]
   }
   partIndexs = partIndexs.map((indexStr:string) => {