新增网易云、酷狗排行榜音乐直接试听下载

This commit is contained in:
lyswhut
2019-08-20 01:19:01 +08:00
parent b8d07b365b
commit 78d2541c14
18 changed files with 266 additions and 43 deletions
+6
View File
@@ -3,8 +3,14 @@
* @param {*} info
* @param {*} type
*/
const types = ['flac', 'ape', '320k', '192k', '128k']
export const getMusicType = (info, type) => {
switch (window.globalObj.apiSource) {
case 'kg':
case 'wy':
return '128k'
}
const rangeType = types.slice(types.indexOf(type))
for (const type of rangeType) {
if (info._types[type]) return type