mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/lyswhut/lx-music-desktop.git
synced 2026-09-20 08:04:00 +08:00
fix type
This commit is contained in:
2
src/common/types/list.d.ts
vendored
2
src/common/types/list.d.ts
vendored
@@ -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()
|
||||
|
||||
2
src/renderer/types/player.d.ts
vendored
2
src/renderer/types/player.d.ts
vendored
@@ -35,7 +35,7 @@ declare namespace LX {
|
||||
/**
|
||||
* 播放列表id
|
||||
*/
|
||||
listId: '__temp__'
|
||||
listId: string
|
||||
/**
|
||||
* 歌曲信息
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user