diff --git a/publish/changeLog.md b/publish/changeLog.md index ac017df0..472aa354 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -5,5 +5,6 @@ ### 其他 +- 移除所有内置源,由于收到腾讯投诉要求停止提供软件内置的连接到他们平台的在线播放及下载服务,所以从即日(2023年10月18日)起LX本身不再提供上述服务 - 更新 electron 到 v25.9.1 - 更新许可协议的排版,使其看起来更加清晰明了,更新数据来源原理说明 diff --git a/src/renderer/core/apiSource.ts b/src/renderer/core/apiSource.ts index 7bd51351..9ee78f92 100644 --- a/src/renderer/core/apiSource.ts +++ b/src/renderer/core/apiSource.ts @@ -22,7 +22,7 @@ export const setUserApi = async(apiId: string) => { }) } else { // @ts-expect-error - qualityList.value = musicSdk.supportQuality[apiId] as LX.QualityList + qualityList.value = musicSdk.supportQuality[apiId] ?? {} apiSource.value = apiId void setUserApiAction(apiId) } diff --git a/src/renderer/utils/musicSdk/api-source-info.js b/src/renderer/utils/musicSdk/api-source-info.js deleted file mode 100644 index a8475b9c..00000000 --- a/src/renderer/utils/musicSdk/api-source-info.js +++ /dev/null @@ -1,25 +0,0 @@ -// Support qualitys: 128k 320k flac wav - -export default [ - { - id: 'test', - name: '测试接口', - disabled: false, - supportQualitys: { - kw: ['128k'], - kg: ['128k'], - tx: ['128k'], - wy: ['128k'], - mg: ['128k'], - // bd: ['128k'], - }, - }, - { - id: 'temp', - name: '临时接口', - disabled: false, - supportQualitys: { - kw: ['128k'], - }, - }, -] diff --git a/src/renderer/utils/musicSdk/api-source-info.ts b/src/renderer/utils/musicSdk/api-source-info.ts new file mode 100644 index 00000000..65cf20e2 --- /dev/null +++ b/src/renderer/utils/musicSdk/api-source-info.ts @@ -0,0 +1,32 @@ +// Support qualitys: 128k 320k flac wav + +const sources: Array<{ + id: string + name: string + disabled: boolean + supportQualitys: Partial> +}> = [ + // { + // id: 'test', + // name: '测试接口', + // disabled: false, + // supportQualitys: { + // kw: ['128k'], + // kg: ['128k'], + // tx: ['128k'], + // wy: ['128k'], + // mg: ['128k'], + // // bd: ['128k'], + // }, + // }, + // { + // id: 'temp', + // name: '临时接口', + // disabled: false, + // supportQualitys: { + // kw: ['128k'], + // }, + // }, +] + +export default sources diff --git a/src/renderer/utils/musicSdk/api-source.js b/src/renderer/utils/musicSdk/api-source.js index bf4a6479..da6d07d4 100644 --- a/src/renderer/utils/musicSdk/api-source.js +++ b/src/renderer/utils/musicSdk/api-source.js @@ -1,21 +1,21 @@ import apiSourceInfo from './api-source-info' import { apiSource, userApi } from '@renderer/store' -import api_temp_kw from './kw/api-temp' -// import api_test_bd from './bd/api-test' -import api_test_tx from './tx/api-test' -import api_test_kg from './kg/api-test' -import api_test_kw from './kw/api-test' -import api_test_mg from './mg/api-test' -import api_test_wy from './wy/api-test' +// import api_temp_kw from './kw/api-temp' +// // import api_test_bd from './bd/api-test' +// import api_test_tx from './tx/api-test' +// import api_test_kg from './kg/api-test' +// import api_test_kw from './kw/api-test' +// import api_test_mg from './mg/api-test' +// import api_test_wy from './wy/api-test' const allApi = { - temp_kw: api_temp_kw, - // test_bd: api_test_bd, - test_tx: api_test_tx, - test_kg: api_test_kg, - test_kw: api_test_kw, - test_mg: api_test_mg, - test_wy: api_test_wy, + // temp_kw: api_temp_kw, + // // test_bd: api_test_bd, + // test_tx: api_test_tx, + // test_kg: api_test_kg, + // test_kw: api_test_kw, + // test_mg: api_test_mg, + // test_wy: api_test_wy, } const apiList = {} diff --git a/src/renderer/views/Setting/components/UserApiModal.vue b/src/renderer/views/Setting/components/UserApiModal.vue index 59fdf21f..c3da793f 100644 --- a/src/renderer/views/Setting/components/UserApiModal.vue +++ b/src/renderer/views/Setting/components/UserApiModal.vue @@ -84,7 +84,7 @@ export default { if (!api) return if (appSetting['common.apiSource'] == api.id) { let backApi = apiSourceInfo.find(api => !api.disabled) - if (backApi) updateSetting({ 'common.apiSource': backApi.id }) + updateSetting({ 'common.apiSource': backApi?.id ?? '' }) } userApi.list = await removeUserApi([api.id]) },