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

Modified Files:
        program_display.py recordings.py 
Log Message:
make it possible to schedule recordings for testing

Index: recordings.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/recordings.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** recordings.py       4 Nov 2004 19:14:08 -0000       1.3
--- recordings.py       4 Nov 2004 19:55:48 -0000       1.4
***************
*** 1,4 ****
- # test code, replacing record_client and record_server in the future
- 
  import sys
  import mcomm
--- 1,2 ----
***************
*** 6,12 ****
  server = None
  
! def list_recordings_return(return_list, data = None):
!     print return_list
!     
  def notification(entity):
      global server
--- 4,21 ----
  server = None
  
! def schedule_recording(prog):
!     if not server:
!         return False, 'Recordserver unavailable'
!     info = {}
!     # if prog['description']:
!     #     info['description'] = prog['description']
!     try:
!         return server.recording_add(prog['title'], prog['channel'],
!                                     0, prog['start'], prog['stop'], info)
!     except mcomm.MException, e:
!         print e
!         return False, 'Internal server error'
! 
! 
  def notification(entity):
      global server
***************
*** 23,34 ****
          except mcomm.MException, e:
              print 'recordings.notification:', e
-         info = { 'description': 'foo', 'sub_title': 1 }
-         print server.recording_add(String('Umlaut �'), Unicode('�RF'), 2, 78, 100, 
info)
-         sys.exit(0)
-         return
-     
- mcomm.register_entity_notification(notification)
  
- if __name__ == '__main__':
-     import notifier
-     notifier.loop()
--- 32,34 ----

Index: program_display.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/program_display.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** program_display.py  23 Oct 2004 15:19:32 -0000      1.44
--- program_display.py  4 Nov 2004 19:55:48 -0000       1.45
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.45  2004/11/04 19:55:48  dischi
+ # make it possible to schedule recordings for testing
+ #
  # Revision 1.44  2004/10/23 15:19:32  rshortt
  # Stub off some functions with Alerts.
***************
*** 77,80 ****
--- 80,85 ----
  # from tv.record_types import Favorite
  
+ import recordings
+ 
  DEBUG = config.DEBUG
  
***************
*** 298,306 ****
  
      def schedule_program(self, arg=None, menuw=None):
!         msg = 'WORK IN PROGRESS'
!         AlertBox(text=_('Scheduling Failed')+(': %s' % msg)).show()
!         return
! 
!         (result, msg) = record_client.scheduleRecording(self.prog)
          if result:
              if menuw:
--- 303,307 ----
  
      def schedule_program(self, arg=None, menuw=None):
!         (result, msg) = recordings.schedule_recording(self)
          if result:
              if menuw:
***************
*** 310,318 ****
                  menuw.back_one_menu(arg='reload')
              AlertBox(text=_('"%s" has been scheduled for recording') % \
!                      self.prog.title).show()
          else:
              AlertBox(text=_('Scheduling Failed')+(': %s' % msg)).show()
-         # then menu back one or refresh the menu with remove option
-       # instead of schedule
  
  
--- 311,317 ----
                  menuw.back_one_menu(arg='reload')
              AlertBox(text=_('"%s" has been scheduled for recording') % \
!                      self.title).show()
          else:
              AlertBox(text=_('Scheduling Failed')+(': %s' % msg)).show()
  
  



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to