|
@@ -10,7 +10,7 @@ import { audioListStart, getAudioCurrentTime, getAudioDuration, setAudioCurrentT
|
|
|
import { toggleFollow } from "./view/follow-practice";
|
|
|
import { browser, setStorageSpeed, setGlobalData } from "./utils";
|
|
|
import { api_cloudGetMediaStatus, api_createMusicPlayer, api_cloudChangeSpeed, api_cloudSuspend, api_cloudSetCurrentTime, api_cloudDestroy } from "./helpers/communication";
|
|
|
-import { verifyCanRepeat, getDuration } from "./helpers/formateMusic";
|
|
|
+import { verifyCanRepeat, getDuration, xmlAddPartName } from "./helpers/formateMusic";
|
|
|
import { getMusicSheetDetail } from "./utils/baseApi"
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import { followData, skipNotePractice } from "/src/view/follow-practice/index"
|
|
@@ -1339,7 +1339,8 @@ const getMusicInfo = async (res: any) => {
|
|
|
state.defaultScoreRender = res.data?.defaultScoreRender
|
|
|
const partIndex = query["part-index"] ? parseInt(query["part-index"]) : -1 // -1为partIndex没有值的时候
|
|
|
/* 获取声轨列表 */
|
|
|
- const xmlString = await fetch(res.data.xmlFileUrl).then((response) => response.text());
|
|
|
+ let xmlString = await fetch(res.data.xmlFileUrl).then((response) => response.text());
|
|
|
+ xmlString = xmlAddPartName(xmlString);
|
|
|
downloadXmlStr.value = xmlString //给musice-score 赋值xmlString 以免加载2次
|
|
|
const tracks = xmlToTracks(xmlString) //获取声轨列表
|
|
|
// 设置音源 track 为当前的声轨 index为当前的
|