Skip to content

播放列表功能实现 #2369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open

播放列表功能实现 #2369

wants to merge 15 commits into from

Conversation

QiuLiang-99
Copy link

@QiuLiang-99 QiuLiang-99 commented May 2, 2025

由于本人代码水平太低,打开pr的目的是希望其他人可以帮忙实现代码或者可以review我的代码(对ts不熟悉使用了大量的ai)。本人自己完成代码略感困难
如果此pr完成,可以关闭以下的issue
close #2368 #2261 #2115 #2018 #1921 #1805 #1782 #1693 #1680 #1532 #1524 #1385 #913 #837 #800
目前已经完成的部分:
基础的ui和交互逻辑:
待完成的部分:
i18n,主题样式适配,ui优化,稍后播放列表model
目前的难点:
由于lx源码的混乱导致无法真正创建一个list保存将要播放的歌曲,具体体现在
随机播放是播放下一首时从当前歌单随机挑选一首未播放的曲目播放
顺序播放则是获取当前歌单,然后将index加1。歌曲的播放行为基于“我的列表”这一功能且耦合严重。
建议解决方案:
将所有将要播放的歌曲的id保存成一个list然后再进行排序。与原本的“我的列表”解耦

@lyswhut
Copy link
Owner

lyswhut commented May 2, 2025

感谢PR,
这是 LX 最初的播放机制一直沿用到现在,纵然期间经历了重构,但是没有更改这个机制,现在改起来需要更改的东西太多,
如果确实要做,它应该放到 LX 的 3.0 版本实现,现在的LX暂无这样重大更改的计划,从目前的情况看 LX 应该没有 3.0 版本了。

但这个功能目前已被添加到了新项目 Any Listen 中,这个项目的设计拥有 允许 代替 LX 的能力,但目前的阶段还不行,仍然需要时间

@QiuLiang-99
Copy link
Author

目前进度
完成了稍后播放列表model
修改了在“我的列表”中播放的行为,由tempplaylist完全接管预播放列表,并且实现了歌单切换

@QiuLiang-99
Copy link
Author

QiuLiang-99 commented May 3, 2025

2.10.4beta往后更新依赖之后无论如何都无法成功构建代码,2.10.4之前为正常
npm error path D:\Github\lx-music-desktop\node_modules\electron
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm error RequestError: read ECONNRESET
npm error at ClientRequest. (D:\Github\lx-music-desktop\node_modules\got\dist\source\core\index.js:970:111)
npm error at Object.onceWrapper (node:events:633:26)
npm error at ClientRequest.emit (node:events:530:35)
npm error at origin.emit (D:\Github\lx-music-desktop\node_modules@szmarczak\http-timer\dist\source\index.js:43:20)
npm error at emitErrorEvent (node:_http_client:104:11)
npm error at TLSSocket.socketErrorListener (node:_http_client:518:5)
npm error at TLSSocket.emit (node:events:518:28)
npm error at emitErrorNT (node:internal/streams/destroy:170:8)
npm error at emitErrorCloseNT (node:internal/streams/destroy:129:3)
npm error at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
npm error at TLSWrap.onStreamRead (node:internal/stream_base_commons:216:20)

@Folltoshe
Copy link
Contributor

2.10.4beta往后更新依赖之后无论如何都无法成功构建代码,2.10.4之前为正常 npm error path D:\Github\lx-music-desktop\node_modules\electron npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c node install.js npm error RequestError: read ECONNRESET npm error at ClientRequest. (D:\Github\lx-music-desktop\node_modules\got\dist\source\core\index.js:970:111) npm error at Object.onceWrapper (node:events:633:26) npm error at ClientRequest.emit (node:events:530:35) npm error at origin.emit (D:\Github\lx-music-desktop\node_modules@szmarczak\http-timer\dist\source\index.js:43:20) npm error at emitErrorEvent (node:_http_client:104:11) npm error at TLSSocket.socketErrorListener (node:_http_client:518:5) npm error at TLSSocket.emit (node:events:518:28) npm error at emitErrorNT (node:internal/streams/destroy:170:8) npm error at emitErrorCloseNT (node:internal/streams/destroy:129:3) npm error at process.processTicksAndRejections (node:internal/process/task_queues:90:21) npm error at TLSWrap.onStreamRead (node:internal/stream_base_commons:216:20)

你的网络有问题,需要科学上网

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants