qier222 / YesPlayMusic

高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:
https://music.qier222.com
MIT License
27.77k stars 4.09k forks source link

MPRIS接口对于Play/Pause的处理有问题 #2168

Open easyteacher opened 6 months ago

easyteacher commented 6 months ago

尽量每个 issue 只提一个 bug 或新功能

提新 issue 前请确认 👉

反馈 bug 需要的信息

https://github.com/qier222/YesPlayMusic/blob/master/src/electron/mpris.js 里,对于play/pause的信号,总是调用playpause,导致即使在暂停播放的时候调用pause,播放器仍然会继续播放,而不是保持暂停。

mokurin000 commented 5 months ago

https://github.com/qier222/YesPlayMusic/blob/fd40a291801ab0dc0c66a531531a3929b7012e63/src/electron/ipcRenderer.js#L34-L36 明明应该叫 playpause的,但是... https://github.com/search?q=repo%3Aqier222%2FYesPlayMusic+.send%28%27play%27%29&type=code send('play') 有这么多地方

然后

https://github.com/qier222/YesPlayMusic/blob/fd40a291801ab0dc0c66a531531a3929b7012e63/src/electron/mpris.js#L15-L17

https://github.com/qier222/YesPlayMusic/blob/fd40a291801ab0dc0c66a531531a3929b7012e63/src/utils/Player.js#L808-L848

有分别的 play() 和 pause() 但都没单独导出