【发布时间】:2014-06-07 17:48:57
【问题描述】:
我曾经通过调用“rhythmbox [播客的网址]”来订阅新的播客,但由于this bug,这不再有效。它只是打开 Rhythmbox,而不是打开和订阅。 (尽管如果您碰巧在播客部分单击“添加”,它会预先填充它)
GTK3 应用程序之间是否有一些新的通信方式,或者应用程序无法简单地告诉 Rhythmbox 订阅某个播客?
更新:查看答案here 我在 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 here,我想我差不多了:
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?
【问题讨论】:
标签: python ubuntu gtk pygobject rhythmbox