Update of /cvsroot/freevo/freevo/src/helpers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8300/src/helpers

Modified Files:
        tv_grab.py 
Log Message:
-Add -s xmltv_nofetch to load existing XMLTV data into the DB.
-Add -s none to not load any data but continue with the program.
-Move the pyepg connect() and load() calls into the main loop so it doesn't
 detect channels when merely running --help.


Index: tv_grab.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/helpers/tv_grab.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** tv_grab.py  13 Feb 2005 18:05:03 -0000      1.20
--- tv_grab.py  24 Mar 2005 18:12:16 -0000      1.21
***************
*** 42,47 ****
  
  import pyepg
- pyepg.connect('sqlite', sysconfig.datafile('epgdb'))
- pyepg.load(config.TV_CHANNELS, config.TV_CHANNELS_EXCLUDE)
  
  
--- 42,45 ----
***************
*** 89,94 ****
  
      parser.add_option('-s', '--source', dest='source', default='xmltv',
!                       help='set the source for the guide: xmltv (default) ' + 
\
!                             'or vdr')
      parser.add_option('-q', '--query', action="store_true", dest='query', 
                        default=False,
--- 87,92 ----
  
      parser.add_option('-s', '--source', dest='source', default='xmltv',
!                       help='set the source for the guide: xmltv (default), ' 
+ \
!                             'xmltv_nofetch, vdr, or none')
      parser.add_option('-q', '--query', action="store_true", dest='query', 
                        default=False,
***************
*** 101,104 ****
--- 99,105 ----
      (options, args) = parser.parse_args()
  
+     pyepg.connect('sqlite', sysconfig.datafile('epgdb'))
+     pyepg.load(config.TV_CHANNELS, config.TV_CHANNELS_EXCLUDE)
+ 
  
      if options.query:
***************
*** 140,145 ****
--- 141,150 ----
      if options.source == 'xmltv':
          grab_xmltv()
+     elif options.source == 'xmltv_nofetch':
+         pyepg.update('xmltv', config.XMLTV_FILE)
      elif options.source == 'vdr':
          grab_vdr()
+     elif options.source == 'none':
+         pass
      else:
          print 'ERROR: source "%s" not supported.' % options.source



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to