修改scheme校验
parent
cc7ad7c71f
commit
54ddb7473b
|
@ -125,6 +125,8 @@ const usePlayMusic = () => {
|
|||
|
||||
{ key: 'copyrightId', types: ['string', 'number'], required: true, max: 64 },
|
||||
{ key: 'lrcUrl', types: ['string'], max: 1024 },
|
||||
{ key: 'trcUrl', types: ['string'], max: 1024 },
|
||||
{ key: 'mrcUrl', types: ['string'], max: 1024 },
|
||||
], musicInfo)
|
||||
break
|
||||
default: throw new Error('Unknown source: ' + musicInfo.source)
|
||||
|
|
|
@ -18,7 +18,7 @@ export const sourceVerify = source => {
|
|||
if (!sources.includes(source)) throw new Error('Source no match')
|
||||
}
|
||||
|
||||
export const qualitys = ['128k', '320k', 'flac', 'flac32bit']
|
||||
export const qualitys = ['128k', '320k', 'flac', 'flac24bit']
|
||||
export const qualityFilter = (source, types) => {
|
||||
types = types.filter(({ type }) => qualitys.includes(type)).map(({ type, size, hash }) => {
|
||||
if (size != null && typeof size != 'string') throw new Error(type + ' size type no match')
|
||||
|
|
Loading…
Reference in New Issue