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