For plasma6, move here https://github.com/KangweiZhu/lyrics-on-panel/tree/plasma6.
As we can see, up to 5/20/2024, several popular Linux distributions have updated their stable channels from the Plasma 5 environment to Plasma 6. The API related to MPRIS2 in Plasma 6 has changed and is definitely buggy, as many software, such as Spotify, seem not to implement it correctly. However, embracing new versions is the motto of all rolling release distributions. The next step is since this widget received approximately 800+ downloads in total in one and a half months (which is definitely good for a pet project), I will try to refactor or at least optimize the codebase of the Plasma 5 version of this widget. Then, I will cease updates for Plasma 5 and focus on fixing known defects and adding features to the Plasma 6 version.
在KDE下, 复刻了 MacOS网易云音乐桌面端 的 歌词顶栏显示 功能
MacOS原效果参考:https://blog.csdn.net/weixin_34061200/article/details/112693092, 或自行下载网易云音乐进行对比。
歌词同步采用两套逻辑:
- YesPlayMusic (YPM): 直接从 YPM 暴露在本地的端口获取 当前播放歌曲的歌词
- Compatible(兼容): 从 Lrclib开源 歌词数据库中 通过(歌手,曲名,专辑名)fetch歌词。 若 不存在这三个参数的 精确匹配的结果,则用歌曲名做一次模糊查询
通过 Mpris2 数据源 获取当前播放音乐的所属媒体源。兼容模式 理论适用于所有正确实现了 Mpris2 规范的播放器,包括通过 Google Chrome, FireFox 访问的在线流媒体平台。兼容模式下, 主流歌曲 歌词匹配成功率 超过95%
As for installing the widget, you will have 2 approaches:
-
Use the GUI operation recommended by the KDE official website at this link.
-
In the terminal, type
kpackagetool5 -t Plasma/Applet -i xxxx
, replacingxxxx
with the path to your extracted folder. e.g./home/anicaa/.local/share/plasma/plasmoids/lyrics-on-panel-master
.
- Under Fullscreen
- Panel Only
- Synchronized lyrics (Even more precise then Spotify!)
- Freedom of Customizing every component of this widget