fix type
parent
7273b6ad67
commit
bf310adc12
|
@ -4,7 +4,7 @@ declare namespace LX {
|
|||
id: string
|
||||
name: string
|
||||
// list: LX.Music.MusicInfo[]
|
||||
source?: LX.Source
|
||||
source?: LX.OnlineSource
|
||||
sourceListId?: string
|
||||
// position?: number
|
||||
locationUpdateTime: number | null
|
||||
|
|
|
@ -56,7 +56,7 @@ export const createUserList = async({ name, id = `userlist_${Date.now()}`, list
|
|||
name?: string
|
||||
id?: string
|
||||
list?: LX.Music.MusicInfo[]
|
||||
source?: LX.Source
|
||||
source?: LX.OnlineSource
|
||||
sourceListId?: string
|
||||
position?: number
|
||||
}) => {
|
||||
|
|
|
@ -22,7 +22,7 @@ const fetchList = async(id: string, source: LX.OnlineSource, sourceListId: strin
|
|||
export default async(targetListInfo: LX.List.UserListInfo) => {
|
||||
// console.log(targetListInfo)
|
||||
if (!targetListInfo.source || !targetListInfo.sourceListId) return
|
||||
const list = await fetchList(targetListInfo.id, targetListInfo.source as LX.OnlineSource, targetListInfo.sourceListId)
|
||||
const list = await fetchList(targetListInfo.id, targetListInfo.source, targetListInfo.sourceListId)
|
||||
// console.log(list)
|
||||
void overwriteListMusics({ listId: targetListInfo.id, musicInfos: list })
|
||||
const now = Date.now()
|
||||
|
|
|
@ -35,7 +35,7 @@ declare namespace LX {
|
|||
/**
|
||||
* 播放列表id
|
||||
*/
|
||||
listId: '__temp__'
|
||||
listId: string
|
||||
/**
|
||||
* 歌曲信息
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue