[Rhythmbox-devel] How to get a specific source?


I want to get a specific source (radio source) in my Python plugin. By
googling around, i found this one:

http://www.mail-archive.com/rhythmbox-devel gnome org/msg04659.html

for group in shell.props.sourcelist_model:
    print 'Group name: ', group[2]
    for source in group.iterchildren():
        for props in source:
            print props

It gives the following output:

<__main__.RBIRadioSource object at 0x30904b0 (RBIRadioSource at 0x2681000)>
<PangoAttrList at 0x2da9240>

Unfortunately, the name property ("Radio") is translated in the user's language, so it seems rather ugly to use it to determine whether it's the radio source.

Maybe there is even an easier way to get the radio source, or maybe i can check if the object is of type RBIRadioSource, but I don't know how to do this in Python.

Any help is appreciated!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]