Update of /cvsroot/freevo/freevo/src/tv
In directory sc8-pr-cvs1:/tmp/cvs-serv14877/src/tv

Modified Files:
        record_server.py 
Log Message:
Further integration of record_server.  Moved config items and plugin info
into freevo_config.py.  Also in freevo_config.py I moved FREEVO_CACHEDIR
higher up in the file so more things can use it.


Index: record_server.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/record_server.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** record_server.py    13 Jul 2003 18:08:52 -0000      1.9
--- record_server.py    11 Aug 2003 18:01:24 -0000      1.10
***************
*** 9,12 ****
--- 9,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.10  2003/08/11 18:01:24  rshortt
+ # Further integration of record_server.  Moved config items and plugin info
+ # into freevo_config.py.  Also in freevo_config.py I moved FREEVO_CACHEDIR
+ # higher up in the file so more things can use it.
+ #
  # Revision 1.9  2003/07/13 18:08:52  rshortt
  # Change tv_util.get_chan_displayname() to accept channel_id instead of
***************
*** 80,83 ****
--- 85,89 ----
  from record_types import ScheduledRecordings
  
+ import config
  import record_types
  import epg_xmltv
***************
*** 90,114 ****
  os.environ['LD_PRELOAD'] = ''
  
! # We need to locate record_config.py
! cfgfilepath = [ os.environ['FREEVO_STARTDIR'],
!                 os.path.expanduser('~/.freevo'),
!                 '/etc/freevo',
!                 '.' ]
  
- got_cfg = 0
- for dirname in cfgfilepath:
-     cfgfilename = dirname + '/record_config.py'
-     if os.path.isfile(cfgfilename):
-         print 'Loading cfg: %s' % cfgfilename
-         execfile(cfgfilename, globals(), locals())
-         got_cfg = 1
-         break
  
! if not got_cfg:
!     print "\nERROR: can't find record_config.py"
!     sys.exit(1)
  
  
- plugin.init()
  
  DEBUG = 1
--- 96,110 ----
  os.environ['LD_PRELOAD'] = ''
  
! print 'PLUGIN_RECORD: %s' % config.plugin_record
  
  
! def load_plugin(id):
!     for name, type, level, args, number in plugin.__all_plugins__:
!         if number == int(id):
!             plugin.__load_plugin__(name, type, level, args, number)
!             return
  
+ load_plugin(config.plugin_record)
  
  
  DEBUG = 1
***************
*** 131,137 ****
          scheduledRecordings = None
  
!         if os.path.isfile(RECORD_SCHEDULE):
!             if DEBUG: log.debug('GET: reading cached file (%s)' % RECORD_SCHEDULE)
!             scheduledRecordings = marmalade.unjellyFromXML(open(RECORD_SCHEDULE, 
'r'))
      
              try:
--- 127,133 ----
          scheduledRecordings = None
  
!         if os.path.isfile(config.RECORD_SCHEDULE):
!             if DEBUG: log.debug('GET: reading cached file (%s)' % 
config.RECORD_SCHEDULE)
!             scheduledRecordings = 
marmalade.unjellyFromXML(open(config.RECORD_SCHEDULE, 'r'))
      
              try:
***************
*** 167,173 ****
              scheduledRecordings = ScheduledRecordings()
      
!         if DEBUG: log.debug('SAVE: saving cached file (%s)' % RECORD_SCHEDULE)
          if DEBUG: log.debug("SAVE: ScheduledRecordings has %s items." % 
len(scheduledRecordings.programList))
!         marmalade.jellyToXML(scheduledRecordings, open(RECORD_SCHEDULE, 'w'))
          return TRUE
  
--- 163,169 ----
              scheduledRecordings = ScheduledRecordings()
      
!         if DEBUG: log.debug('SAVE: saving cached file (%s)' % config.RECORD_SCHEDULE)
          if DEBUG: log.debug("SAVE: ScheduledRecordings has %s items." % 
len(scheduledRecordings.programList))
!         marmalade.jellyToXML(scheduledRecordings, open(config.RECORD_SCHEDULE, 'w'))
          return TRUE
  
***************
*** 309,328 ****
                  if duration < 10:
                      return FALSE
-                 # title = tv_util.getProgFilename(prog)
-                 # rec_cmd = '%s %s %s "%s"' % \
-                 #   (config.REC_CMD, prog.tunerid, duration, title)
-                 # aflags = '-d /dev/dsp1 -r 32000 -b 16 -s -ab 128'
-                 # vflags = '-input Television -vb 1400 -vq 100 -w 480 -h 360'
- 
-                 # cl_options = { 'channel'  : prog.tunerid,
-                 #                'filename' : title,
-                 #                'seconds'  : duration }
- 
-                 # rec_cmd = config.VCR_CMD % cl_options
- 
-                 # rec_cmd = '/var/media/bin/tvrecord %s %s "%s"' % \
-                 #    (prog.tunerid, duration, title)
  
-                 # log.debug('REC_CMD: %s' % rec_cmd)
                  log.debug('going to record: %s' % prog)
                  prog.isRecording = TRUE
--- 305,309 ----
***************
*** 733,737 ****
      app = Application("RecordServer")
      rs = RecordServer()
!     app.listenTCP(RECORD_SERVER_PORT, server.Site(rs))
      rs.startMinuteCheck()
      app.run(save=0)
--- 714,718 ----
      app = Application("RecordServer")
      rs = RecordServer()
!     app.listenTCP(config.RECORD_SERVER_PORT, server.Site(rs))
      rs.startMinuteCheck()
      app.run(save=0)




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to