私はRhythmboxプラグインを作成して、現在Rhythmboxに認識されているすべてのポッドキャストファイル(ダウンロードされているかどうかに関係なく)を反復処理し、それらを使用して何かを実行します。
RhythmboxのPythonシェルで調査とテストを行った後、すべてのオブジェクトのリストを取得することに成功しました。ただし、プラグインにコーディングすると、エラーが発生します。
(rhythmbox:7500): GLib-GObject-WARNING **: invalid cast from `RhythmDBTree' to `RhythmDBEntryType'
リストはentries
空です:
def run(self, action, shell):
db = shell.get_property('db')
entry_type = db.entry_type_get_by_name('podcast-post')
print entry_type
entries = []
db.entry_foreach_by_type(entry_type, entries.append)
print entries
ただし、print entry_type
は:を返す<rhythmdb.EntryType object at 0xa7ea34c (RhythmDBEntryType at 0xa106988)>
ため、dbオブジェクトは明らかに有効です。
私は何が間違っているのですか?