Re: [Rhythmbox-devel] db.entry_get changes for plugins
- From: Pablo Carranza <pcarranza gmail com>
- To: rhythmbox-devel gnome org
- Subject: Re: [Rhythmbox-devel] db.entry_get changes for plugins
- Date: Thu, 24 Nov 2011 09:13:22 +0100
This is the way i've found, I'm facing the same problem:
def some_method()
return self.get_value(entry, RB.RhythmDBPropType.ENTRY_ID)
def get_value(self, entry, property_type):
t = self.db.get_property_type(property_type)
value = GObject.Value()
value.init(t)
self.db.entry_get(entry, property_type, value)
return value.get_ulong()
return value.get_string()
return value.get_boolean()
return value.get_boxed()
return value.get_char()
return value.get_double()
return value.get_enum()
return value.get_flags()
return value.get_float()
return value.get_int()
return value.get_int64()
return value.get_long()
return value.get_object()
return value.get_param()
return value.get_pointer()
return value.get_string()
return value.get_uchar()
return value.get_uint()
return value.get_uint64()
return value.get_variant()
else:
self.warning('Unknown type %s' %
t.name)
return None
There sure is a better way to do it, but this one is working right now
On Thu, Nov 24, 2011 at 9:03 AM, Lachlan
<lachlan 00 gmail com> wrote:
So now that Debian testing is running git versions of Rhythmbox I've
been updating my plugin.
So far i have it activating and the menu items are populating which is
awesome, now i just have to work out functionality
from what i've found on the net it should be changing from one line to
the next one:
self.db.entry_get(db_entry, rhythmdb.PROP_ALBUM)
self.db.entry_get(db_entry, RB.RhythmDBPropType.ALBUM)
When i run this though i get told that entry_get() takes 4 arguments (3 given)
I think this has to do with self.db but i'm unsure about where to check.
Lachlan
_______________________________________________
rhythmbox-devel mailing list
rhythmbox-devel gnome org
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
--
Pablo Carranza
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]