Rhythmbox:如何访问“评级”?通过Python脚本跟踪轨道的字段?
我希望能够通过 Python 获取/设置与特定曲目相关的评级。我该如何实现这一目标?
I would like the capability to get/set the rating associated with a specific track through a Python. How do I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Rhythmbox 的 D-Bus 接口。我编写了一个小脚本,可以获取/设置评级并显示通知,所有这些都作用于当前播放的歌曲。
脚本在这里:http://kaizer.se/wiki/code/rhating.py
附录一:我保证我会写出更漂亮的 Python,但它不是一次性脚本!
附录二:缺少的用法字符串是
./rhating.py [NEWRATING 0..5]
附录三:如果我过滤脚本并取出在文件系统中准确设置歌曲评级的部分位置
uri
,是这样的:You can use Rhythmbox' D-Bus interface. I have written a small script that can get/set the rating and displays a notification, all acting on the currently playing song.
The script is here: http://kaizer.se/wiki/code/rhrating.py
Addendum one: I promise I write more beautiful Python when it's not a throwaway script!
Addendum two: The missing Usage string is
./rhrating.py [NEWRATING 0..5]
Addendum three: If I filter the script and take out the parts that exactly set the rating of a song at filesystem location
uri
, it's this: