Update of /cvsroot/freevo/freevo/lib/pyepg
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11594/lib/pyepg

Modified Files:
        source_vdr.py 
Log Message:
Add a new paramater to source_vdr, limit_channels, to limit the channels found
in the channels.conf, the EPG, or both.


Index: source_vdr.py
===================================================================
RCS file: /cvsroot/freevo/freevo/lib/pyepg/source_vdr.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** source_vdr.py       12 Dec 2004 15:33:37 -0000      1.3
--- source_vdr.py       28 Apr 2005 01:37:01 -0000      1.4
***************
*** 32,40 ****
  
  import os
  from vdr.vdr import VDR
  
  
  def update(guide, vdr_dir=None, channels_file=None, epg_file=None,
!              host=None, port=None, access_by='sid', verbose=1):
  
      exclude_channels = guide.exclude_channels
--- 32,42 ----
  
  import os
+ import string
  from vdr.vdr import VDR
  
  
  def update(guide, vdr_dir=None, channels_file=None, epg_file=None,
!            host=None, port=None, access_by='sid', limit_channels='', 
!            verbose=1):
  
      exclude_channels = guide.exclude_channels
***************
*** 69,72 ****
--- 71,84 ----
      for c in chans:
          if c.id in exclude_channels:  continue
+ 
+         if string.lower(limit_channels) == 'epg' and not c.in_epg:
+             continue
+         elif string.lower(limit_channels) == 'conf' and not c.in_conf:  
+             continue
+         elif string.lower(limit_channels) == 'both' and \
+              not (c.in_conf and c.in_epg):  
+             continue
+ 
+ 
          if access_by == 'name':
              access_id = c.name



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to