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

Modified Files:
        rssh.py 
Log Message:
make epg work again

Index: rssh.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/helpers/rssh.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rssh.py     20 Dec 2004 21:28:40 -0000      1.2
--- rssh.py     22 Dec 2004 10:32:27 -0000      1.3
***************
*** 6,9 ****
--- 6,10 ----
  
  import notifier
+ import pyepg
  import config
  import mcomm
***************
*** 11,16 ****
  server = None
  
! # import pyepg
! # epg = pyepg.get_epg(os.path.join(config.FREEVO_CACHEDIR, 'epgdb'))
  
  def notification(entity):
--- 12,16 ----
  server = None
  
! config.detect('channels')
  
  def notification(entity):
***************
*** 29,35 ****
  
  def print_result(result):
!     # FIXME: doesn't work for epg results
!     if isinstance(result, (list, tuple)) and len(result) > 0 and \
!            isinstance(result[0], (list, tuple)):
          for r in result:
              print r
--- 29,33 ----
  
  def print_result(result):
!     if isinstance(result, (list, tuple)):
          for r in result:
              print r
***************
*** 49,54 ****
          print
          print 'epg commands:'
!         print '  epg.search_programs(name)'
!         print '  epg.get_programs(channels, start, stop)'
          print
          print 'record commands:'
--- 47,53 ----
          print
          print 'epg commands:'
!         print '  epg.search(name)'
!         print '  epg[channel id][start time]'
!         print '  epg[channel id][start time:end time]'
          print
          print 'record commands:'
***************
*** 70,76 ****
          print 'favorite calls.'
          
!     elif input == 'exit':
          print
          sys.exit(0)
      elif input.startswith('time'):
          try:
--- 69,77 ----
          print 'favorite calls.'
          
!     elif input in ('exit', 'byte', 'quit'):
          print
          sys.exit(0)
+     elif input == '':
+         pass
      elif input.startswith('time'):
          try:
***************
*** 101,108 ****
          except Exception, e:
              print e
!     elif input.startswith('epg.'):
          print '\rcalling epg command'
          try:
!             result = eval(input)
              print_result(result)
          except Exception, e:
--- 102,110 ----
          except Exception, e:
              print e
!     elif input.startswith('epg'):
          print '\rcalling epg command'
          try:
!             print 
!             result = eval('pyepg.guide' + String(input[3:]))
              print_result(result)
          except Exception, e:



-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to