Hi Guillaume I had a feeling that it was going in that direction :-( - So - I had a quick glance at _player_status_cb() It looks like a lot logic is bound to types (models) already known by elisa. If we want to refactor this the model for the plugin must either inherit from a well-defined class that knows about covers/images or do some sort of "duck-typing" (taste the present model and see if it has some sort of attribute resembling an image/cover. The first will affect a lot of existing code, while the second will be a extra clause (simple I hope - but I might have misunderstood something)
I tried to put a pdb.set_trace() in _player_status_cb() to how it behaves in the database-plugin-case and in my custom-plugin-case - but it does not seem to affect the program execution I have a development version (0.5.29 + 0.5.31) and the official release (0.5.27 + 0.5.31) installed on my ubuntu 8.10 I tried to put the set_trace both places but nothing happened. Removing /usr/lib/python2.5/site-packages/elisa/plugins/poblesec/player_video.pyc will not generate a new pyc-file when running elisa and it is the only player_video.pyc file I could find on my Ubuntu-box Is there another binary version of the files in my filesystem in some precompiled-python-files (I do not know much about python) Please advice on how to debug (put in a pdb.set_trace()) in the player_video.py-code. Best Regards, Kristian Lippert > Date: Thu, 12 Mar 2009 22:05:40 +0100 > From: [email protected] > To: [email protected] > CC: [email protected] > Subject: Re: [Elisa] My weekly cry for help:-) How to put image in player > > Hi Kristian, > > Thanks for your interest in Elisa, and on hacking for Elisa! > > I'm very sorry nobody has answered that question yet, but the thing is: > it's a tricky one. > The problem is that the present architecture of the player does not > allow for a lot of control from plugins. For now, the displaying of > these images, as well as a lot of other things that should be specific > to some plugins, is handled entirely in the player. > To make it possible to put an image in the background of the player from > a plugin, we would need to do quite some refactoring work in the > PlayerController (in poblesec/player_video.py; yes, the file is called > player_video, but that's what's used for music as well), and in > particualr in its (huge) _player_status_cb() method. I don't know if > anyone has planned to do such a thing, but reworking the player is > definitely something we should do sooner than later, right now, it's > next to properly interact with it from a plugin... > > So, in a nutshell, if you haven't figured out how to do it, and if > nobody was able to tell you how to do it, that's simply because it's not > possible. > Of course, if you have time to spend working on that (non trivial) task > of refactoring the player, we would be happy to advise you and to review > a patch. > > Guillaume > > On 21:44 Thu 12 Mar , Kristian Lippert wrote: > > > > Hi > > > > Here is my weekly cry for help: > > > > I still havn't figured out how to put an image in the player when using a > > custom plugin > > > > Could any with knowledge of the player or the database plugin please help > > me! > > > > At least point me to some code I can look at. > > > > > > > > Best Regards, > > > > Kristian Lippert > > > > _________________________________________________________________ > > News, entertainment and everything you care about at Live.com. Get it now! > > http://www.live.com/getstarted.aspx _________________________________________________________________ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
