mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-30 21:00:43 +08:00
feat: 优化媒体服务器播放列表的添加逻辑,避免重复项
This commit is contained in:
@@ -27,7 +27,9 @@ async function loadPlayingList(server: string) {
|
||||
// 不存在时添加
|
||||
for (const item of result) {
|
||||
const index = playingList.value.findIndex(i => i.id === item.id)
|
||||
if (index === -1) playingList.value = playingList.value.concat(result)
|
||||
if (index === -1) {
|
||||
playingList.value.push(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user