Hello,

I would like some input on the best approach.  I have wrote a new tv
guide that mimics the tivo-style guide viewer.  In order to make the
plugin work, I have also made the current tvguide.py a plugin (and I
activate it as the default in freevo_conf.py).  The new tv guide plugin
does not require any changes to the skin fxd files since it uses the
same layout area currently defined in the skins and used by
tvlisting_area.py.  

One question remains: It appears that plugins are not yet active at the
time the singleton for TVListing_Area() is instantiated.  This means
that I can't check which plugin is active and return either
TVListing_Area() or TiVoListing_Area() in get_singleton().  That would
have been my prefered approach since it seems more straight forward and
would lend to future tv guide plugins.

The other approach, that I'm currently doing, involves added a data
member to the class in tvguide.py and tivoguide.py called self.
display_type.  This value will indicate which update_content() function
to call inside the TVListing_Area().  And since plugins are active when
the TVListing_Area update_content() is called, I can check which one to
use there.  For example:

class TVListing_Area(Skin_Area):
...
   def update_content(self):
      tvplugin = plugin.getbyname('TVGUIDE')
      if tvplugin.display_guide == 'tivoguide':
         self.update_content_tivoguide()
      else:
         self.update_content_tvguide()

   def update_content_tvguide(self):
        ....
   def update_content_tivoguide(self):
        ....

Please let me know if the 2nd approach (while it works) is not good
practice.  If the 1st approach would be better, then that would mean
plugins need to be active prior to traversing the skin code in src/
skins/ ?

For some screenshots and the code, check out:

http://flatline.mine.nu/freevo-tivoguide/

Suggestions welcome,
-jlaska



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to