我曾经通过调用“rhythmbox [播客的网址]”来订阅新的播客,但由于这个错误,这不再有效。它只是打开 Rhythmbox,而不是打开和订阅。(尽管如果您碰巧在播客部分单击“添加”,它会预先填充它)
GTK3 应用程序之间是否有一些新的通信方式,或者应用程序没有办法简单地告诉 Rhythmbox 订阅某个播客?
更新:在这里查看答案,我发现以下内容在 iPython 中有很多 tab 键:
from gi.repository import RB
....
In [2]: RB.PodcastManager.insert_feed_url
Out[2]: gi.FunctionInfo(insert_feed_url)
In [3]: RB.PodcastManager.insert_feed_url('http://feeds.feedburner.com/NodeUp')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-b6415d6bfb17> in <module>()
----> 1 RB.PodcastManager.insert_feed_url('http://feeds.feedburner.com/NodeUp')
TypeError: insert_feed_url() takes exactly 2 arguments (1 given)
这似乎是正确的 API,但论据是什么?它会在 GTK3 之前的系统中工作吗?
更新在这里通过Python api,我想我几乎拥有它:
from gi.repository import RB
mypod = RB.PodcastChannel() #Creates blank podcast object
RB.podcast_parse_load_feed(mypod, 'http://wpdevtable.com/feed/podcast/', False)
#loads mypod.url, mypod.description etc.
RB.PodcastManager.add_parsed_feed(mypod); #fails
看来 add_parsed_feed 上的文档不正确,需要 2 个参数,而不是 1 个。我知道内部类的函数是用 定义的def thing(self, firstarg)
,这是否会导致 Python 绑定到 Rhythmbox 出现问题?为什么我不能将解析后的播客添加到 Rhythmbox 中?