Re: [Rhythmbox-devel] song_info question

On Sun, Sep 27, 2009 at 12:11 AM, Jonathan Matthew <notverysmart gmail com> wrote:
On Fri, Sep 25, 2009 at 9:57 AM, Mindaugas Budreika
<mindaugas bu gmail com> wrote:
> Hi
> I'm trying to finish my fist rhythmbox plug-in in python and I my problem is
> that I want to edit song_info Basic tab (fields stroked in red) from other
> tab, the one I created by myself (stroked in blue) before clicking close. In
> other words if I add like a year of release in my tab I want it to be
> visible in Basic tab as well without closing and reopening song_info.
> The problem is that if I'm doing:
>         self.db.set(, rhythmdb.PROP_ALBUM, model[row][1])
>         self.db.set(, rhythmdb.PROP_GENRE, self.id3[1])
>         self.db.commit()
> the ID3 data is saved only if I close the song_info window with X. If I
> choose Back, Forward or Close buttons all the ID3 corrections made by my tab
> is being overwritten by rhythmbox (probably song_info functions)
> maybe there is other ways to solve this? but anyway I would like to see my
> changes in Basic tab without closing whole window.

You'd need to make the song info window watch for changes to the entry
it's displaying and update its text fields so that it wouldn't try to
restore the original values when the window was closed.

I thought about that, but is there a way to do that from plugin? My first thought was to get the instance of tab0 object(Notebook) then get it's child(s) and try to update information for every field listed there or at least the ones I need. But as I'm totally new to py and especially to pyGTK I not sure if it's possible and if it is how to get these childs. I looked in gtk.Notebook documentation for some function which could return me a childs but I didn't find anything like this.

Anyway. Is still cannot update PROP_YEAR tag. 'em I the only one with this problem? Could I get an example if it works for some of you guys. PS: please specify rb version just in case.

Mindaugas Budreika
Kuala Lumpur, Malaysia
Skype:  mike_pukuotukas_lt
Phone# +60123581195

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