Re: db.entry_get changes for plugins

Lachlan <[email protected]>
Newsgroups gmane.comp.gnome.apps.rhythmbox.devel
Message-ID <CAMXB9EH1=V3pYc3D5bcuCH4fRJzkcTvE-GgD4+UsT9Z_wTWLrg@mail.gmail.com>
On 28 November 2011 17:39, Lachlan <[email protected]> wrote:
>> entry.__setattr__('LOCATION', 'file:///etc/etc/etc/etc.mp3')
>
> On further testing this code doesn't work for me, it actually was
> creating a new entry in the database with just the new location. :(

This was my fault, I'd removed code while i was testing without
realising that was altering the string to fit into the database naming
style. So when i was editing the location i was sending rhythmbox a
bad location string, which must be why the new entry was created.

I did also found another way to update entries rather than using
entry.__setsttr__. There is entry_set which is part of db:

self.db.entry_set(self.entry, RB.RhythmDBPropType.LOCATION, self.location)

If anyone else is having trouble this is probably a much better way to
do it. (and will save you a lot of time spent in the Python Console ;)
)

Cheers,
Lachlan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.