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

Modified Files:
        record_types.py record_server.py 
Log Message:
Change favorites to use tv_util.get_chan_displayname(prog) as 
favorite.channel rather than channel_id.


Index: record_types.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/record_types.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** record_types.py     11 May 2003 22:41:51 -0000      1.1
--- record_types.py     6 Jul 2003 20:04:27 -0000       1.2
***************
*** 10,13 ****
--- 10,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.2  2003/07/06 20:04:27  rshortt
+ # Change favorites to use tv_util.get_chan_displayname(prog) as
+ # favorite.channel rather than channel_id.
+ #
  # Revision 1.1  2003/05/11 22:41:51  rshortt
  # Classes used by tv/recording apps.
***************
*** 40,54 ****
  #endif
  
! import sys
! import time, os, string
! # import config
! # import rec_interface 
! # from epg_types import TvProgram
! 
! from twisted.spread import pb
  
  # The file format version number. It must be updated when incompatible
  # changes are made to the file format.
! TYPES_VERSION = 1
  
  # Set to 1 for debug output
--- 44,53 ----
  #endif
  
! import sys, time, os, string
! import tv_util
  
  # The file format version number. It must be updated when incompatible
  # changes are made to the file format.
! TYPES_VERSION = 2
  
  # Set to 1 for debug output
***************
*** 153,159 ****
  
            if exactchan:
!                 self.channel_id = prog.channel_id
              else:
!                 self.channel_id = 'ANY'
            
            if exactdow:
--- 152,158 ----
  
            if exactchan:
!                 self.channel = tv_util.get_chan_displayname(prog)
              else:
!                 self.channel = 'ANY'
            
            if exactdow:
***************
*** 164,170 ****
            
            if exacttod:
-               # TODO: translate the TOD from prog.start
                lt = time.localtime(prog.start)
-                 # self.tod = '%s:%s' % (lt[3], lt[4])
                  self.mod = (lt[3]*60)+lt[4]
              else:
--- 163,167 ----
***************
*** 173,177 ****
          else:
              self.title = 'NONE'
!             self.channel_id = 'NONE'
              self.dow = 'NONE'
              self.mod = 'NONE'
--- 170,174 ----
          else:
              self.title = 'NONE'
!             self.channel = 'NONE'
              self.dow = 'NONE'
              self.mod = 'NONE'

Index: record_server.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/record_server.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** record_server.py    22 May 2003 00:10:16 -0000      1.7
--- record_server.py    6 Jul 2003 20:04:27 -0000       1.8
***************
*** 9,12 ****
--- 9,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.8  2003/07/06 20:04:27  rshortt
+ # Change favorites to use tv_util.get_chan_displayname(prog) as
+ # favorite.channel rather than channel_id.
+ #
  # Revision 1.7  2003/05/22 00:10:16  rshortt
  # Getting rid of LD_PRELOAD.
***************
*** 134,144 ****
                  log.debug(('ScheduledRecordings version number %s is stale (new is 
%s), must ' +
                          'be reloaded') % (file_ver, TYPES_VERSION))
              else:
                  if DEBUG:
                      log.debug('Got ScheduledRecordings (version %s).' % file_ver)
      
!         if scheduledRecordings == None:
              log.debug('GET: making a new ScheduledRecordings')
              scheduledRecordings = ScheduledRecordings()
      
          log.debug('ScheduledRecordings has %s items.' % 
len(scheduledRecordings.programList))
--- 138,150 ----
                  log.debug(('ScheduledRecordings version number %s is stale (new is 
%s), must ' +
                          'be reloaded') % (file_ver, TYPES_VERSION))
+                 scheduledRecordings = None
              else:
                  if DEBUG:
                      log.debug('Got ScheduledRecordings (version %s).' % file_ver)
      
!         if not scheduledRecordings:
              log.debug('GET: making a new ScheduledRecordings')
              scheduledRecordings = ScheduledRecordings()
+             self.saveScheduledRecordings(scheduledRecordings)
      
          log.debug('ScheduledRecordings has %s items.' % 
len(scheduledRecordings.programList))
***************
*** 357,361 ****
          fav.name = name
          fav.title = title
!         fav.channel_id = chan
          fav.dow = dow
          fav.mod = mod
--- 363,367 ----
          fav.name = name
          fav.title = title
!         fav.channel = chan
          fav.dow = dow
          fav.mod = mod
***************
*** 460,464 ****
      
              if prog.title == fav.title:    
!                 if fav.channel_id == prog.channel_id or fav.channel_id == 'ANY':
                      if fav.dow == dow or fav.dow == 'ANY':
                          if fav.mod == min_of_day or fav.mod == 'ANY':
--- 466,471 ----
      
              if prog.title == fav.title:    
!                 if fav.channel == tv_util.get_chan_displayname(prog) \
!                    or fav.channel == 'ANY':
                      if fav.dow == dow or fav.dow == 'ANY':
                          if fav.mod == min_of_day or fav.mod == 'ANY':




-------------------------------------------------------
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/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to