Re: [Rhythmbox-devel] db.entry_get changes for plugins



On 28 November 2011 17:39, Lachlan <lachlan 00 gmail com> 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


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