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

Modified Files:
        ivtv_record.py generic_record.py 
Log Message:
Get the filename from tv_util.getProgFilename().


Index: ivtv_record.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/plugins/ivtv_record.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** ivtv_record.py      10 Jun 2004 02:32:17 -0000      1.23
--- ivtv_record.py      22 Jun 2004 01:05:51 -0000      1.24
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.24  2004/06/22 01:05:51  rshortt
+ # Get the filename from tv_util.getProgFilename().
+ #
  # Revision 1.23  2004/06/10 02:32:17  rshortt
  # Add RECORD_START/STOP events along with VCR_PRE/POST_REC commands.
***************
*** 96,102 ****
  import plugin 
  import rc
  
  from event import Event
- 
  from tv.channels import FreevoChannels
  
--- 99,105 ----
  import plugin 
  import rc
+ import util.tv_util as tv_util
  
  from event import Event
  from tv.channels import FreevoChannels
  
***************
*** 129,132 ****
--- 132,138 ----
  
      def Record(self, rec_prog):
+         # It is safe to ignore config.TV_RECORDFILE_SUFFIX here.
+         rec_prog.filename = os.path.splitext(tv_util.getProgFilename(rec_prog))[0] + 
'.mpeg'
+ 
          self.thread.mode = 'record'
          self.thread.prog = rec_prog
***************
*** 135,138 ****
--- 141,145 ----
          if DEBUG: print('Recorder::Record: %s' % rec_prog)
          
+ 
      def Stop(self):
          self.thread.mode = 'stop'
***************
*** 160,168 ****
                  
              elif self.mode == 'record':
-                 self.prog.filename = '%s/%s.mpeg' % \
-                                             (config.TV_RECORD_DIR, 
-                                              string.replace(self.prog.filename,
-                                                             ' ', '_'))
- 
                  rc.post_event(Event('RECORD_START', arg=self.prog))
                  if DEBUG: print 'Record_Thread::run: started recording'
--- 167,170 ----

Index: generic_record.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/plugins/generic_record.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** generic_record.py   21 Jun 2004 07:21:22 -0000      1.20
--- generic_record.py   22 Jun 2004 01:05:52 -0000      1.21
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.21  2004/06/22 01:05:52  rshortt
+ # Get the filename from tv_util.getProgFilename().
+ #
  # Revision 1.20  2004/06/21 07:21:22  dischi
  # o add autokill to stop recording when the app can't take care of that
***************
*** 93,96 ****
--- 96,100 ----
  import plugin 
  import rc
+ import util.tv_util as tv_util
  
  from event import *
***************
*** 126,130 ****
          frequency = self.fc.chanSet(str(rec_prog.tunerid), 'record plugin')
  
!         rec_prog.filename = config.TV_RECORD_DIR + '/' + rec_prog.filename
  
          cl_options = { 'channel'  : rec_prog.tunerid,
--- 130,134 ----
          frequency = self.fc.chanSet(str(rec_prog.tunerid), 'record plugin')
  
!         rec_prog.filename = tv_util.getProgFilename(rec_prog)
  
          cl_options = { 'channel'  : rec_prog.tunerid,
***************
*** 138,150 ****
          self.rec_command = config.VCR_CMD % cl_options
      
-         if config.VCR_CMD.find('%(filename)s') > 0:
-             ext = config.VCR_CMD[config.VCR_CMD.find('%(filename)s')+12:]
-             for bad_char in (' ', '"', '\''):
-                 if ext.find(bad_char) > 0:
-                     ext = ext[:ext.find(bad_char)]
-                     print ext
-             if ext.startswith('.') and len(ext) < 5:
-                 rec_prog.filename += ext
- 
          self.thread.mode     = 'record'
          self.thread.prog     = rec_prog
--- 142,145 ----



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to