mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-03 14:12:08 +08:00
移除所有内置源
This commit is contained in:
parent
3cd5519e0a
commit
b0ae614d2a
@ -8,4 +8,5 @@
|
||||
|
||||
### 其他
|
||||
|
||||
- 移除所有内置源,由于收到腾讯投诉要求停止提供软件内置的连接到他们平台的在线播放及下载服务,所以从即日(2023年10月18日)起LX本身不再提供上述服务
|
||||
- 更新许可协议的排版,使其看起来更加清晰明了,更新数据来源原理说明
|
||||
|
@ -2,7 +2,7 @@ const defaultSetting: LX.AppSetting = {
|
||||
version: '2.0',
|
||||
'common.isAutoTheme': false,
|
||||
'common.langId': null,
|
||||
'common.apiSource': 'temp',
|
||||
'common.apiSource': 'empty',
|
||||
'common.sourceNameType': 'alias',
|
||||
'common.shareType': 'system',
|
||||
'common.isAgreePact': false,
|
||||
|
@ -22,7 +22,7 @@ export const setUserApi = (apiId: string) => {
|
||||
// })
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
global.lx.qualityList = musicSdk.supportQuality[apiId] as LX.QualityList
|
||||
global.lx.qualityList = musicSdk.supportQuality[apiId] ?? {}
|
||||
// apiSource.value = apiId
|
||||
// void setUserApiAction(apiId)
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ const hello = async(urlInfo: LX.Sync.UrlInfo) => request(`${urlInfo.httpProtocol
|
||||
let result = verRxp.exec(text)?.[1]
|
||||
if (result != null) {
|
||||
const servVer = parseInt(result)
|
||||
const localVer = parseInt(verRxp.exec(SYNC_CODE.helloMsg)[1])
|
||||
const localVer = parseInt(verRxp.exec(SYNC_CODE.helloMsg)![1])
|
||||
if (servVer > localVer) throw new Error(SYNC_CODE.highServiceVersion)
|
||||
else if (servVer < localVer) throw new Error(SYNC_CODE.lowServiceVersion)
|
||||
}
|
||||
@ -99,6 +99,7 @@ const auth = async(urlInfo: LX.Sync.UrlInfo, serverId: string, authCode?: string
|
||||
|
||||
export default async(urlInfo: LX.Sync.UrlInfo, authCode?: string) => {
|
||||
console.log('connect: ', urlInfo.href, authCode)
|
||||
console.log(`${urlInfo.httpProtocol}//${urlInfo.hostPath}/hello`)
|
||||
if (!await hello(urlInfo)) throw new Error(SYNC_CODE.connectServiceFailed)
|
||||
const serverId = await getServerId(urlInfo)
|
||||
if (!serverId) throw new Error(SYNC_CODE.getServiceIdFailed)
|
||||
|
@ -1,37 +0,0 @@
|
||||
// Support qualitys: 128k 320k flac wav
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
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'],
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'direct',
|
||||
name: '直连接口',
|
||||
disabled: false,
|
||||
supportQualitys: {
|
||||
kw: ['128k'],
|
||||
kg: ['128k'],
|
||||
tx: ['128k'],
|
||||
wy: ['128k'],
|
||||
mg: ['128k', '320k'],
|
||||
},
|
||||
},
|
||||
]
|
29
src/utils/musicSdk/api-source-info.ts
Normal file
29
src/utils/musicSdk/api-source-info.ts
Normal file
@ -0,0 +1,29 @@
|
||||
// Support qualitys: 128k 320k flac wav
|
||||
|
||||
const sources: Array<{
|
||||
id: string
|
||||
name: string
|
||||
disabled: boolean
|
||||
supportQualitys: Partial<Record<LX.OnlineSource, LX.Quality[]>>
|
||||
}> = [
|
||||
{
|
||||
id: 'empty',
|
||||
name: 'empty',
|
||||
disabled: false,
|
||||
supportQualitys: {},
|
||||
},
|
||||
{
|
||||
id: 'direct',
|
||||
name: '直连接口',
|
||||
disabled: false,
|
||||
supportQualitys: {
|
||||
kw: ['128k'],
|
||||
kg: ['128k'],
|
||||
tx: ['128k'],
|
||||
wy: ['128k'],
|
||||
mg: ['128k'],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
export default sources
|
Loading…
x
Reference in New Issue
Block a user