diff --git a/src/common/types/list.d.ts b/src/common/types/list.d.ts index 2de868ac..82c325a4 100644 --- a/src/common/types/list.d.ts +++ b/src/common/types/list.d.ts @@ -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 diff --git a/src/renderer/store/list/action.ts b/src/renderer/store/list/action.ts index d70eb0c9..a2f6f995 100644 --- a/src/renderer/store/list/action.ts +++ b/src/renderer/store/list/action.ts @@ -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 }) => { diff --git a/src/renderer/store/list/syncSourceList.ts b/src/renderer/store/list/syncSourceList.ts index b14a1dff..ad6ac65b 100644 --- a/src/renderer/store/list/syncSourceList.ts +++ b/src/renderer/store/list/syncSourceList.ts @@ -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() diff --git a/src/renderer/types/player.d.ts b/src/renderer/types/player.d.ts index f5eec12f..5856b294 100644 --- a/src/renderer/types/player.d.ts +++ b/src/renderer/types/player.d.ts @@ -35,7 +35,7 @@ declare namespace LX { /** * 播放列表id */ - listId: '__temp__' + listId: string /** * 歌曲信息 */