Re: [Rhythmbox-devel] Nomad Jukebox Plugin...



On 11/1/07, Robert Connolly <rob_connolly mailshack com> wrote:
> Hi,
>
> I new to this mailing list (this is my first posting), however I've been
> working on a plugin to support NJB devices using the python binding pynjb.
>
> A couple of you have had conversations with me over IRC and have been
> very helpful. Thanks!
>
> I have now got to a point where my plugin will detect the device (either
> on rhythmbox startup or via a dbus message) and will create a source for
> the device. This all seems to work fine except I get an error message on
> the debug output:
>
> Traceback (most recent call last):
>   File "/home/robert/.gnome2/rhythmbox/plugins/rbnjb/__init__.py", line
> 120, in __init__
>     rb.RemovableMediaSource(self, *args, **kwargs)
> TypeError: could not convert parameter 'entry_type' of type
> 'RhythmDBEntryType'

I'm not sure what's going on here, but it suggests that your entry
type isn't being created properly, or maybe there's something wrong in
the python bindings.

> (rhythmbox:7426): Rhythmbox-WARNING **: source 0x883cc88 has no group

This means you need to specify a source group for your source. The
"devices" group is the one you should be using. Find the source group
like this:

  group = rb.rb_source_group_get_by_name('devices')

and pass it in to the source constructor as the 'source_group' argument.

> This seems to refer to the following lines of code:
>
> # create entry type with unique name: NJB:<owner>:<device_no>
> db = self.shell.props.db
> entry_type = db.entry_register_type("NJB:" +
> njb_device.GetOwnerString()+ ":" +
>      str(self.devices))

This looks like it should work..

> # create source
> source = gobject.new(rbnjbSource, shell=self.shell,
>      name=_(njb_device.GetOwnerString()+"'s Jukebox"),

I'm not sure why you're passing the constructed source name through
_() - this would attempt to get a translation for "Rob's Jukebox" (for
example), which isn't likely to exist. Maybe you want '_("%s's
Jukebox") % (njb_device.GetOwnerString()' instead?

Good to hear that you're making progress with this.


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