Author: duncan
Date: Fri Oct 19 03:19:19 2007
New Revision: 10000

Log:
[ 1814703 ] PATCH recordserver / year tag
Added TV_RECORD_YEAR_FORMAT

This has highlighted some naming oddities with the other config variables, 
these have been fixed too


Modified:
   branches/rel-1/freevo/freevo_config.py
   branches/rel-1/freevo/local_conf.py.example
   branches/rel-1/freevo/src/helpers/convert_config.py
   branches/rel-1/freevo/src/helpers/recordserver.py
   branches/rel-1/freevo/src/image/imageitem.py
   branches/rel-1/freevo/src/item.py
   branches/rel-1/freevo/src/plugins/autoshutdown.py
   branches/rel-1/freevo/src/plugins/buttonbar.py
   branches/rel-1/freevo/src/skins/main/tvlisting_area.py
   branches/rel-1/freevo/src/tv/channels.py
   branches/rel-1/freevo/src/tv/edit_favorite.py
   branches/rel-1/freevo/src/tv/epg_types.py
   branches/rel-1/freevo/src/tv/favoriteitem.py
   branches/rel-1/freevo/src/tv/plugins/ivtv_record.py
   branches/rel-1/freevo/src/tv/plugins/manual_record.py
   branches/rel-1/freevo/src/tv/plugins/mplayer.py
   branches/rel-1/freevo/src/tv/plugins/xawtv.py
   branches/rel-1/freevo/src/tv/program_display.py
   branches/rel-1/freevo/src/tv/programitem.py
   branches/rel-1/freevo/src/util/misc.py
   branches/rel-1/freevo/src/util/tv_util.py
   branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy
   branches/rel-1/freevo/src/www/htdocs/favorites.rpy
   branches/rel-1/freevo/src/www/htdocs/guide.rpy
   branches/rel-1/freevo/src/www/htdocs/index.rpy
   branches/rel-1/freevo/src/www/htdocs/proginfo.rpy
   branches/rel-1/freevo/src/www/htdocs/record.rpy
   branches/rel-1/freevo/src/www/htdocs/search.rpy

Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py      (original)
+++ branches/rel-1/freevo/freevo_config.py      Fri Oct 19 03:19:19 2007
@@ -320,12 +320,23 @@
         ENABLE_SHUTDOWN_SYS to SHUTDOWN_SYS_ENABLE
         FREQUENCY_TABLE to TV_FREQUENCY_TABLE
         CONFIRM_SHUTDOWN to SHUTDOWN_CONFIRM
+        DUPLICATE_DETECTION to TV_RECORD_DUPLICATE_DETECTION
+        ONLY_NEW_DETECTION to TV_RECORD_ONLY_NEW_DETECTION
+        CONFLICT_RESOLUTION to TV_RECORD_CONFLICT_RESOLUTION
+        REMOVE_COMMERCIALS to TV_RECORD_REMOVE_COMMERCIALS
+        TV_DATEFORMAT to TV_DATE_FORMAT
+        TV_TIMEFORMAT to TV_TIME_FORMAT
+        TV_DATETIMEFORMAT to TV_DATETIME_FORMAT
+        TV_RECORDFILE_MASK to TV_RECORD_FILE_MASK
+        TV_RECORDFILE_SUFFIX to TV_RECORD_FILE_SUFFIX
+        TV_RECORDFILE_OKLETTERS to TV_RECORD_FILE_OKLETTERS
      Added MIXER_VOLUME_STEP to allow the mixer volume change to be specified
      Added for IVTV XINE TV:
         XINE_TV_CONFIRM_STOP
         XINE_TV_PROGRESSIVE_SEEK
         XINE_TV_PROGRESSIVE_SEEK_THRESHOLD
         XINE_TV_PROGRESSIVE_SEEK_INCREMENT
+     Added TV_RECORD_YEAR_FORMAT to allow the from of the year in TV fxd files 
to be specified
      '''),
 ]
 
@@ -1613,16 +1624,16 @@
 TV_RECORD_DIR = None
 
 # This will enable duplicate recording detection
-DUPLICATE_DETECTION = None
+TV_RECORD_DUPLICATE_DETECTION = None
 
 # This will enable only new episodes to be recorded
-ONLY_NEW_DETECTION = None
+TV_RECORD_ONLY_NEW_DETECTION = None
 
 # This will enable the commercial detection. It is quite process intensive.
-REMOVE_COMMERCIALS = None
+TV_RECORD_REMOVE_COMMERCIALS = None
 
 # This will try to resolve scheduling conflicts and re-schedule when needed
-CONFLICT_RESOLUTION = None
+TV_RECORD_CONFLICT_RESOLUTION = None
 
 #
 # Watching TV
@@ -1661,9 +1672,10 @@
 
 TV_SETTINGS = '%s television %s %s' % (CONF.tv, CONF.chanlist, TV_DEVICE)
 
-TV_DATEFORMAT = '%e-%b' # Day-Month: 11-Jun
-TV_TIMEFORMAT = '%H:%M' # Hour-Minute 14:05
-TV_DATETIMEFORMAT = '%A %b %d %I:%M %p' # Thursday September 24 8:54 am
+TV_DATE_FORMAT = '%e-%b' # Day-Month: 11-Jun
+TV_TIME_FORMAT = '%H:%M' # Hour-Minute 14:05
+TV_DATETIME_FORMAT = '%A %b %d %I:%M %p' # Thursday September 24 8:54 am
+TV_RECORD_YEAR_FORMAT = '%a, %d %b %Y %H:%M:%S %Z' # Fri, 19 Oct 2007 08:58:56 
CEST
 
 # This is the filename format for files recorded using Freevo.
 # You can use any of the strftime variables in it, provided you
@@ -1679,9 +1691,9 @@
 #
 # More can be found at: http://www.python.org/doc/current/lib/module-time.html
 
-TV_RECORDFILE_MASK = '%%m-%%d %%H.%%M %(progname)s - %(title)s'
-TV_RECORDFILE_SUFFIX = '.avi'
-TV_RECORDFILE_OKLETTERS = 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-:'
+TV_RECORD_FILE_MASK = '%%m-%%d %%H.%%M %(progname)s - %(title)s'
+TV_RECORD_FILE_SUFFIX = '.avi'
+TV_RECORD_FILE_OKLETTERS = 
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-:'
 
 # if using the persitant recordserver
 TV_RECORD_SCHEDULE = FREEVO_STATICDIR + '/record_schedule.xml'

Modified: branches/rel-1/freevo/local_conf.py.example
==============================================================================
--- branches/rel-1/freevo/local_conf.py.example (original)
+++ branches/rel-1/freevo/local_conf.py.example Fri Oct 19 03:19:19 2007
@@ -1161,10 +1161,10 @@
 # TV_RECORD_DIR = None
 
 # This will enable duplicate recording detection
-# DUPLICATE_DETECTION = True
+# TV_RECORD_DUPLICATE_DETECTION = True
 
 # This will enable only new episodes to be recorded
-# ONLY_NEW_DETECTION = True
+# TV_RECORD_ONLY_NEW_DETECTION = True
 
 # 
================================================================================
 # Watching TV
@@ -1238,9 +1238,9 @@
 
 # TIMESHIFT_BUFFER = '%s/timeshift.mpeg' % FREEVO_CACHEDIR
 
-# TV_DATEFORMAT = '%e-%b' # Day-Month: 11-Jun
-# TV_TIMEFORMAT = '%H:%M' # Hour-Minute 14:05
-# TV_DATETIMEFORMAT = '%A %b %d %I:%M %p' # Thursday September 24 8:54 am
+# TV_DATE_FORMAT = '%e-%b' # Day-Month: 11-Jun
+# TV_TIME_FORMAT = '%H:%M' # Hour-Minute 14:05
+# TV_DATETIME_FORMAT = '%A %b %d %I:%M %p' # Thursday September 24 8:54 am
 
 # This is the filename format for files recorded using Freevo.
 # You can use any of the strftime variables in it, provided you
@@ -1256,7 +1256,7 @@
 #
 # More can be found at: http://www.python.org/doc/current/lib/module-time.html
 
-# TV_RECORDFILE_MASK = '%%m-%%d %%H:%%M %(progname)s - %(title)s'
+# TV_RECORD_FILE_MASK = '%%m-%%d %%H:%%M %(progname)s - %(title)s'
 
 # If using the persistent recordserver
 # TV_RECORD_SCHEDULE = '%s/record_schedule.xml' % FREEVO_CACHEDIR

Modified: branches/rel-1/freevo/src/helpers/convert_config.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/convert_config.py (original)
+++ branches/rel-1/freevo/src/helpers/convert_config.py Fri Oct 19 03:19:19 2007
@@ -107,6 +107,16 @@
     'ENABLE_SHUTDOWN_SYS': 'SHUTDOWN_SYS_ENABLE',
     'FREQUENCY_TABLE': 'TV_FREQUENCY_TABLE',
     'CONFIRM_SHUTDOWN': 'SHUTDOWN_CONFIRM',
+    'DUPLICATE_DETECTION': 'TV_RECORD_DUPLICATE_DETECTION',
+    'ONLY_NEW_DETECTION': 'TV_RECORD_ONLY_NEW_DETECTION',
+    'CONFLICT_RESOLUTION': 'TV_RECORD_CONFLICT_RESOLUTION',
+    'REMOVE_COMMERCIALS': 'TV_RECORD_REMOVE_COMMERCIALS',
+    'TV_DATEFORMAT': 'TV_DATE_FORMAT',
+    'TV_TIMEFORMAT': 'TV_TIME_FORMAT',
+    'TV_DATETIMEFORMAT': 'TV_DATETIME_FORMAT',
+    'TV_RECORDFILE_MASK': 'TV_RECORD_FILE_MASK',
+    'TV_RECORDFILE_SUFFIX': 'TV_RECORD_FILE_SUFFIX',
+    'TV_RECORDFILE_OKLETTERS': 'TV_RECORD_FILE_OKLETTERS',
 }
 
 def help():

Modified: branches/rel-1/freevo/src/helpers/recordserver.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/recordserver.py   (original)
+++ branches/rel-1/freevo/src/helpers/recordserver.py   Fri Oct 19 03:19:19 2007
@@ -214,7 +214,7 @@
                 recording = prog.isRecording
             except:
                 recording = FALSE
-            endtime = time.strftime(config.TV_TIMEFORMAT, 
time.localtime(prog.stop+config.TV_RECORD_PADDING_POST))
+            endtime = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(prog.stop+config.TV_RECORD_PADDING_POST))
             _debug_('%s is recording %s stopping at %s' % (prog.title, 
recording and 'yes' or 'no', endtime), 3)
 
             if now > prog.stop + config.TV_RECORD_PADDING_POST:
@@ -460,7 +460,7 @@
             scheduledRecordings = self.getScheduledRecordings()
         scheduledRecordings.addProgram(prog, tv_util.getKey(prog))
         if not inputSchedule:
-            if config.DUPLICATE_DETECTION:
+            if config.TV_RECORD_DUPLICATE_DETECTION:
                 self.addDuplicate(prog)
             self.saveScheduledRecordings(scheduledRecordings)
 
@@ -472,7 +472,7 @@
             scheduledRecordings = self.getScheduledRecordings()
         scheduledRecordings.removeProgram(prog, tv_util.getKey(prog))
         if not inputSchedule:
-            if config.DUPLICATE_DETECTION:
+            if config.TV_RECORD_DUPLICATE_DETECTION:
                 self.removeDuplicate(prog)
             self.saveScheduledRecordings(scheduledRecordings)
 
@@ -535,7 +535,7 @@
                 ratedConflicts.append((rating, conflictedProgs, oneOccurance))
             return (FALSE, ratedConflicts, None)
 
-        if config.CONFLICT_RESOLUTION:
+        if config.TV_RECORD_CONFLICT_RESOLUTION:
             _debug_('Conflict resolution enabled', DINFO)
             ratedConflicts=[]
             myScheduledRecordings = 
copy.deepcopy(self.getScheduledRecordings())
@@ -650,7 +650,7 @@
 
 
     def checkOnlyNewDetection(self, prog=None):
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             _debug_('Only new episode detection enabled', DINFO)
             if not self.doesFavoriteRecordOnlyNewEpisodes(prog):
                 return (TRUE, 'Favorite records all episodes, record')
@@ -663,7 +663,7 @@
 
 
     def checkDuplicateDetection(self, prog=None):
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             _debug_('Duplicate detection enabled', DINFO)
             if self.doesFavoriteAllowDuplicates(prog):
                 return (TRUE, 'Favorite allows duplicates, record')
@@ -1531,9 +1531,9 @@
         fxd.info['tagline'] = fxd.str2XML(rec_prog.sub_title)
         fxd.info['plot'] = fxd.str2XML(desc)
         fxd.info['runtime'] = None
-        fxd.info['recording_timestamp'] = str(time.time())
-        fxd.info['year'] = time.strftime('%m-%d ' + config.TV_TIMEFORMAT,
-                                         time.localtime(rec_prog.start))
+        fxd.info['recording_timestamp'] = str(rec_prog.start)
+        # bad use of the movie year field :)
+        fxd.info['year'] = time.strftime(config.TV_RECORD_YEAR_FORMAT, 
time.localtime(rec_prog.start))
         fxd.title = rec_prog.title
         fxd.writeFxd()
 
@@ -1653,7 +1653,7 @@
                     pass
                 if config.VCR_POST_REC:
                     util.popen3.Popen3(config.VCR_POST_REC)
-                if config.REMOVE_COMMERCIALS:
+                if config.TV_RECORD_REMOVE_COMMERCIALS:
                     (result, response) = connectionTest('connection test')
                     if result:
                         (status, idnr) = initCommDetectJob(prog.filename)

Modified: branches/rel-1/freevo/src/image/imageitem.py
==============================================================================
--- branches/rel-1/freevo/src/image/imageitem.py        (original)
+++ branches/rel-1/freevo/src/image/imageitem.py        Fri Oct 19 03:19:19 2007
@@ -75,7 +75,7 @@
             try:
                 t = str(Item.__getitem__(self, key))
                 if t:
-                    return time.strftime(config.TV_DATETIMEFORMAT,
+                    return time.strftime(config.TV_DATETIME_FORMAT,
                                          time.strptime(t, '%Y:%m:%d %H:%M:%S'))
             except:
                 pass

Modified: branches/rel-1/freevo/src/item.py
==============================================================================
--- branches/rel-1/freevo/src/item.py   (original)
+++ branches/rel-1/freevo/src/item.py   Fri Oct 19 03:19:19 2007
@@ -265,7 +265,7 @@
                 elif self.parent and self.parent.type != 'dir':
                     self.image = util.getimage(os.path.dirname(self.filename)+\
                                                '/cover', self.image)
-            if config.REMOVE_COMMERCIALS:
+            if config.TV_RECORD_REMOVE_COMMERCIALS:
                 edlBase=self.filename[:self.filename.rfind('.')]
                 edlFile=edlBase+".edl"
                 self.edl_file=edlFile

Modified: branches/rel-1/freevo/src/plugins/autoshutdown.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/autoshutdown.py   (original)
+++ branches/rel-1/freevo/src/plugins/autoshutdown.py   Fri Oct 19 03:19:19 2007
@@ -157,7 +157,7 @@
                 except ExNoWakeupNeeded:
                     msg = _("No wakeup scheduled.")
                 else:
-                    next_msg = Unicode(time.strftime( 
config.TV_DATETIMEFORMAT, time.localtime(next)))
+                    next_msg = Unicode(time.strftime( 
config.TV_DATETIME_FORMAT, time.localtime(next)))
                     next_min = int((next - time.time()) / 60)
                     msg = _("The next wakeup is scheduled at") + "\n" + 
next_msg
             else:

Modified: branches/rel-1/freevo/src/plugins/buttonbar.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/buttonbar.py      (original)
+++ branches/rel-1/freevo/src/plugins/buttonbar.py      Fri Oct 19 03:19:19 2007
@@ -317,8 +317,8 @@
             return None
 
         if isinstance(menu, TVGuide):
-            dateformat = config.TV_DATEFORMAT
-            timeformat = config.TV_TIMEFORMAT
+            dateformat = config.TV_DATE_FORMAT
+            timeformat = config.TV_TIME_FORMAT
             if not timeformat:
                 timeformat = '%H:%M'
             if not dateformat:

Modified: branches/rel-1/freevo/src/skins/main/tvlisting_area.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/tvlisting_area.py      (original)
+++ branches/rel-1/freevo/src/skins/main/tvlisting_area.py      Fri Oct 19 
03:19:19 2007
@@ -196,8 +196,8 @@
         h_contents = content.height - 2 * content.spacing
 
         # Print the Date of the current list page
-        dateformat = config.TV_DATEFORMAT
-        timeformat = config.TV_TIMEFORMAT
+        dateformat = config.TV_DATE_FORMAT
+        timeformat = config.TV_TIME_FORMAT
         if not timeformat:
             timeformat = '%H:%M'
         if not dateformat:

Modified: branches/rel-1/freevo/src/tv/channels.py
==============================================================================
--- branches/rel-1/freevo/src/tv/channels.py    (original)
+++ branches/rel-1/freevo/src/tv/channels.py    Fri Oct 19 03:19:19 2007
@@ -155,7 +155,7 @@
         chan = str(chan)
         vg = self.getVideoGroup(chan, isplayer)
 
-        freq = config.TV_FREQUENCY_TABLE.get(chan)
+        freq = config.TV_TV_FREQUENCY_TABLE.get(chan)
         if freq:
             _debug_('Using custom frequency: chan="%s", freq="%s"' % (chan, 
freq))
         else:
@@ -259,8 +259,8 @@
 
         if channels and channels[0] and channels[0].programs:
             if showtime:
-                start_s = time.strftime(config.TV_TIMEFORMAT, 
time.localtime(channels[0].programs[0].start))
-                stop_s = time.strftime(config.TV_TIMEFORMAT, 
time.localtime(channels[0].programs[0].stop))
+                start_s = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(channels[0].programs[0].start))
+                stop_s = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(channels[0].programs[0].stop))
                 ts = '(%s-%s)' % (start_s, stop_s)
                 prog_info = '%s %s' % (ts, channels[0].programs[0].title)
             else:

Modified: branches/rel-1/freevo/src/tv/edit_favorite.py
==============================================================================
--- branches/rel-1/freevo/src/tv/edit_favorite.py       (original)
+++ branches/rel-1/freevo/src/tv/edit_favorite.py       Fri Oct 19 03:19:19 2007
@@ -167,7 +167,7 @@
                 val = i*30
                 # Little hack: we calculate the hours from Jan 1st, 1970 GMT,
                 # and then use strftime to get the string representation
-                text = strftime(config.TV_TIMEFORMAT, gmtime(h * 3600 + 60 * 
m))
+                text = strftime(config.TV_TIME_FORMAT, gmtime(h * 3600 + 60 * 
m))
                 self.tod_box.add_item(text=text, value=val)
                 if val == self.fav.mod:
                     tod_index = i+1

Modified: branches/rel-1/freevo/src/tv/epg_types.py
==============================================================================
--- branches/rel-1/freevo/src/tv/epg_types.py   (original)
+++ branches/rel-1/freevo/src/tv/epg_types.py   Fri Oct 19 03:19:19 2007
@@ -125,13 +125,13 @@
         return the specific attribute as string or an empty string
         """
         if attr == 'start':
-            return Unicode(time.strftime(config.TV_TIMEFORMAT, 
time.localtime(self.start)))
+            return Unicode(time.strftime(config.TV_TIME_FORMAT, 
time.localtime(self.start)))
         if attr == 'pdc_start':
-            return Unicode(time.strftime(config.TV_TIMEFORMAT, 
time.localtime(self.pdc_start)))
+            return Unicode(time.strftime(config.TV_TIME_FORMAT, 
time.localtime(self.pdc_start)))
         if attr == 'stop':
-            return Unicode(time.strftime(config.TV_TIMEFORMAT, 
time.localtime(self.stop)))
+            return Unicode(time.strftime(config.TV_TIME_FORMAT, 
time.localtime(self.stop)))
         if attr == 'date':
-            return Unicode(time.strftime(config.TV_DATEFORMAT, 
time.localtime(self.start)))
+            return Unicode(time.strftime(config.TV_DATE_FORMAT, 
time.localtime(self.start)))
         if attr == 'time':
             return self.getattr('start') + u' - ' + self.getattr('stop')
         if hasattr(self, attr):

Modified: branches/rel-1/freevo/src/tv/favoriteitem.py
==============================================================================
--- branches/rel-1/freevo/src/tv/favoriteitem.py        (original)
+++ branches/rel-1/freevo/src/tv/favoriteitem.py        Fri Oct 19 03:19:19 2007
@@ -76,7 +76,7 @@
             self.mod = _('ANY TIME')
         else:
             try:
-                self.mod = time.strftime(config.TV_TIMEFORMAT,
+                self.mod = time.strftime(config.TV_TIME_FORMAT,
                                     time.gmtime(float(int(fav.mod) * 60)))
             except:
                 print 'Cannot add "%s" to favorites' % fav.name
@@ -112,7 +112,7 @@
         items.append(menu.MenuItem(_('Modify time of day'),
                                     action=self.mod_time))
 
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             if self.allowDuplicates:
                 items.append(menu.MenuItem(_('Prevent Recording of 
Duplicates'),
                              action=self.alter_prop, arg=('dup', 'False')))
@@ -121,7 +121,7 @@
                 action=self.alter_prop, arg=('dup', 'True')))
 
 
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             if self.onlyNew:
                 items.append(menu.MenuItem(_('Record All Episodes'),
                              action=self.alter_prop, arg=('new', 'False')))
@@ -231,7 +231,7 @@
 
         for i in range(48):
             mod = i * 30
-            items.append(menu.MenuItem(time.strftime(config.TV_TIMEFORMAT,
+            items.append(menu.MenuItem(time.strftime(config.TV_TIME_FORMAT,
                                                 time.gmtime(float(mod * 60))),
                                        action=self.alter_prop,
                                        arg=('mod', mod)))
@@ -277,7 +277,7 @@
                 self.fav.mod = 'ANY'
             else:
                 # self.mod = tv_util.minToTOD(val)
-                self.mod = time.strftime(config.TV_TIMEFORMAT,
+                self.mod = time.strftime(config.TV_TIME_FORMAT,
                                     time.gmtime(float(val * 60)))
                 self.fav.mod = val
             if menuw:

Modified: branches/rel-1/freevo/src/tv/plugins/ivtv_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/ivtv_record.py (original)
+++ branches/rel-1/freevo/src/tv/plugins/ivtv_record.py Fri Oct 19 03:19:19 2007
@@ -76,7 +76,7 @@
 
 
     def Record(self, rec_prog):
-        # It is safe to ignore config.TV_RECORDFILE_SUFFIX here.
+        # It is safe to ignore config.TV_RECORD_FILE_SUFFIX here.
         rec_prog.filename = 
os.path.splitext(tv_util.getProgFilename(rec_prog))[0] + '.mpeg'
 
         self.thread.mode = 'record'

Modified: branches/rel-1/freevo/src/tv/plugins/manual_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/manual_record.py       (original)
+++ branches/rel-1/freevo/src/tv/plugins/manual_record.py       Fri Oct 19 
03:19:19 2007
@@ -95,7 +95,7 @@
         self.start_month = self.starttime[1]
         self.disp_start_month = self.months[self.start_month - 1]
         self.start_day   = self.starttime[2]
-        self.start_time  = time.strftime(config.TV_TIMEFORMAT, self.starttime)
+        self.start_time  = time.strftime(config.TV_TIME_FORMAT, self.starttime)
         self.prog.start  = self.startnow
         self.disp_starttime = '%s %s %s' % (self.disp_start_month, 
self.start_day, self.start_time)
 
@@ -103,7 +103,7 @@
         self.stop_month = self.stoptime[1]
         self.disp_stop_month = self.months[self.stop_month - 1]
         self.stop_day   = self.stoptime[2]
-        self.stop_time  = time.strftime(config.TV_TIMEFORMAT, self.stoptime)
+        self.stop_time  = time.strftime(config.TV_TIME_FORMAT, self.stoptime)
         self.prog.stop  = self.stopnow
         self.disp_stoptime = '%s %s %s' % (self.disp_stop_month, 
self.stop_day, self.stop_time)
 
@@ -206,7 +206,7 @@
             minpadding = 0
         for i in range(288):
             mod = (i * 5 + currminutes + minpadding) % 1440
-            showtime = strftime(config.TV_TIMEFORMAT, gmtime(float(mod * 60)))
+            showtime = strftime(config.TV_TIME_FORMAT, gmtime(float(mod * 60)))
             items.append(menu.MenuItem(showtime,
                                        action=self.alter_prop,
                                        arg=('starttime', showtime)))
@@ -268,7 +268,7 @@
             minpadding = 0
         for i in range(288):
             mod = (i * 5 + currminutes + minpadding) % 1440
-            showtime = strftime(config.TV_TIMEFORMAT, gmtime(float(mod * 60)))
+            showtime = strftime(config.TV_TIME_FORMAT, gmtime(float(mod * 60)))
             items.append(menu.MenuItem(showtime,
                                        action=self.alter_prop,
                                        arg=('stoptime', showtime)))
@@ -354,9 +354,9 @@
         if int(self.start_month) < currentmonth:
             startyear = str(int(startyear) + 1)
         # create utc second start time
-        starttime = time.mktime(strptime.strptime(str(self.start_month)+" 
"+str(self.start_day)+" "+str(startyear)+" "+str(self.start_time)+":00",'%m %d 
%Y '+config.TV_TIMEFORMAT+':%S'))
+        starttime = time.mktime(strptime.strptime(str(self.start_month)+" 
"+str(self.start_day)+" "+str(startyear)+" "+str(self.start_time)+":00",'%m %d 
%Y '+config.TV_TIME_FORMAT+':%S'))
         # create utc stop time
-        stoptime = time.mktime(strptime.strptime(str(self.stop_month)+" 
"+str(self.stop_day)+" "+str(stopyear)+" "+str(self.stop_time)+":00",'%m %d %Y 
'+config.TV_TIMEFORMAT+':%S'))
+        stoptime = time.mktime(strptime.strptime(str(self.stop_month)+" 
"+str(self.stop_day)+" "+str(stopyear)+" "+str(self.stop_time)+":00",'%m %d %Y 
'+config.TV_TIME_FORMAT+':%S'))
 
         # so we don't record for more then maxdays (maxdays day * 24hr/day * 
60 min/hr * 60 sec/min)
         if not abs(stoptime - starttime) < (self.MAXDAYS * 86400):

Modified: branches/rel-1/freevo/src/tv/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/mplayer.py     (original)
+++ branches/rel-1/freevo/src/tv/plugins/mplayer.py     Fri Oct 19 03:19:19 2007
@@ -320,7 +320,7 @@
 
             # Display a channel changed message
             tuner_id, chan_name, prog_info = self.fc.getChannelInfo()
-            now = time.strftime(config.TV_TIMEFORMAT)
+            now = time.strftime(config.TV_TIME_FORMAT)
             msg = '%s %s (%s): %s' % (now, chan_name, tuner_id, prog_info)
             cmd = 'osd_show_text "%s"\n' % msg
             self.app.write(cmd)
@@ -329,7 +329,7 @@
         elif event == em.TOGGLE_OSD:
             # Display the channel info message
             tuner_id, chan_name, prog_info = self.fc.getChannelInfo()
-            now = time.strftime(config.TV_TIMEFORMAT)
+            now = time.strftime(config.TV_TIME_FORMAT)
             msg = '%s %s (%s): %s' % (now, chan_name, tuner_id, prog_info)
             cmd = 'osd_show_text "%s"\n' % msg
             self.app.write(cmd)

Modified: branches/rel-1/freevo/src/tv/plugins/xawtv.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/xawtv.py       (original)
+++ branches/rel-1/freevo/src/tv/plugins/xawtv.py       Fri Oct 19 03:19:19 2007
@@ -103,8 +103,8 @@
                                                stop=time.time(), 
chanids=[chan_id])
 
         if channels and channels[0] and channels[0].programs:
-            start_s = time.strftime(config.TV_TIMEFORMAT, 
time.localtime(channels[0].programs[0].start))
-            stop_s = time.strftime(config.TV_TIMEFORMAT, 
time.localtime(channels[0].programs[0].stop))
+            start_s = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(channels[0].programs[0].start))
+            stop_s = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(channels[0].programs[0].stop))
             ts = '(%s-%s)' % (start_s, stop_s)
             prog_info = '%s %s' % (ts, channels[0].programs[0].title)
         else:

Modified: branches/rel-1/freevo/src/tv/program_display.py
==============================================================================
--- branches/rel-1/freevo/src/tv/program_display.py     (original)
+++ branches/rel-1/freevo/src/tv/program_display.py     Fri Oct 19 03:19:19 2007
@@ -83,9 +83,9 @@
 
         self.favorite = False
 
-        self.start = time.strftime(config.TV_DATETIMEFORMAT,
+        self.start = time.strftime(config.TV_DATETIME_FORMAT,
                                    time.localtime(prog.start))
-        self.stop = time.strftime(config.TV_DATETIMEFORMAT,
+        self.stop = time.strftime(config.TV_DATETIME_FORMAT,
                                        time.localtime(prog.stop))
 
         self.categories = ''
@@ -335,7 +335,7 @@
             self.mod = _('ANY TIME')
         else:
             try:
-                self.mod = strftime(config.TV_TIMEFORMAT,
+                self.mod = strftime(config.TV_TIME_FORMAT,
                                     gmtime(float(int(fav.mod) * 60)))
             except:
                 print 'Cannot add "%s" to favorites' % fav.name
@@ -368,10 +368,10 @@
         items.append(menu.MenuItem(_('Modify time of day'),
                                     action=self.mod_time))
 
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             items.append(menu.MenuItem(_('Modify duplicate flag'), 
action=self.mod_dup))
 
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             items.append(menu.MenuItem(_('Modify episodes flag'), 
action=self.mod_new))
 
         # XXX: priorities aren't quite supported yet
@@ -505,7 +505,7 @@
 
         for i in range(48):
             mod = i * 30
-            items.append(menu.MenuItem(strftime(config.TV_TIMEFORMAT,
+            items.append(menu.MenuItem(strftime(config.TV_TIME_FORMAT,
                                                 gmtime(float(mod * 60))),
                                        action=self.alter_prop,
                                        arg=('mod', mod)))
@@ -547,7 +547,7 @@
                 self.fav.mod = 'ANY'
             else:
                 # self.mod = tv_util.minToTOD(val)
-                self.mod = strftime(config.TV_TIMEFORMAT,
+                self.mod = strftime(config.TV_TIME_FORMAT,
                                     gmtime(float(val * 60)))
                 self.fav.mod = val
 
@@ -583,10 +583,10 @@
 
         if result:
             # create a new edited favorite
-            if not config.DUPLICATE_DETECTION or not hasattr(self.fav, 
'allowDuplicates'):
+            if not config.TV_RECORD_DUPLICATE_DETECTION or not 
hasattr(self.fav, 'allowDuplicates'):
                 self.fav.allowDuplicates = 1
 
-            if not config.ONLY_NEW_DETECTION or not hasattr(self.fav, 
'onlyNew'):
+            if not config.TV_RECORD_ONLY_NEW_DETECTION or not 
hasattr(self.fav, 'onlyNew'):
                 self.fav.onlyNew = 0
 
             (result, msg) = record_client.addEditedFavorite(self.fav.name,

Modified: branches/rel-1/freevo/src/tv/programitem.py
==============================================================================
--- branches/rel-1/freevo/src/tv/programitem.py (original)
+++ branches/rel-1/freevo/src/tv/programitem.py Fri Oct 19 03:19:19 2007
@@ -91,10 +91,10 @@
         self.favorite = False
 
         # start time
-        self.start = time.strftime(config.TV_DATETIMEFORMAT,
+        self.start = time.strftime(config.TV_DATETIME_FORMAT,
                                    time.localtime(prog.start))
         # stop time
-        self.stop = time.strftime(config.TV_DATETIMEFORMAT,
+        self.stop = time.strftime(config.TV_DATETIME_FORMAT,
                                        time.localtime(prog.stop))
 
     def actions(self):

Modified: branches/rel-1/freevo/src/util/misc.py
==============================================================================
--- branches/rel-1/freevo/src/util/misc.py      (original)
+++ branches/rel-1/freevo/src/util/misc.py      Fri Oct 19 03:19:19 2007
@@ -449,7 +449,7 @@
             result = result + u"- %s%s " % \
                      ( Unicode(m.title), Unicode(sub_title) ) \
                      + _('at') + u" %s\n" % \
-                     
Unicode(time.strftime(config.TV_TIMEFORMAT,time.localtime(m.start)))
+                     
Unicode(time.strftime(config.TV_TIME_FORMAT,time.localtime(m.start)))
 
     if len(tomorrow) > 0:
         result = result + _('Tomorrow') + u':\n'
@@ -460,7 +460,7 @@
             result = result + u"- %s%s " % \
                      ( Unicode(m.title), Unicode(sub_title) ) \
                      + _('at') + u" %s\n" % \
-                     
Unicode(time.strftime(config.TV_TIMEFORMAT,time.localtime(m.start)))
+                     
Unicode(time.strftime(config.TV_TIME_FORMAT,time.localtime(m.start)))
 
     if len(later) > 0:
         result = result + _('This Week') + u':\n'
@@ -471,7 +471,7 @@
             result = result + u"- %s%s " % \
                      ( Unicode(m.title), Unicode(sub_title) ) \
                      + _('at') + u" %s\n" % \
-                     
Unicode(time.strftime(config.TV_DATEFORMAT,time.localtime(m.start)))
+                     
Unicode(time.strftime(config.TV_DATE_FORMAT,time.localtime(m.start)))
 
     if not result:
         result = _('No recordings are scheduled')

Modified: branches/rel-1/freevo/src/util/tv_util.py
==============================================================================
--- branches/rel-1/freevo/src/util/tv_util.py   (original)
+++ branches/rel-1/freevo/src/util/tv_util.py   Fri Oct 19 03:19:19 2007
@@ -38,7 +38,7 @@
     '''Translate a program name to something that can be used as a filename.'''
 
     # Letters that can be used in the filename
-    ok = config.TV_RECORDFILE_OKLETTERS
+    ok = config.TV_RECORD_FILE_OKLETTERS
 
     s = ''
     for letter in progname:
@@ -97,11 +97,11 @@
     filename_array = { 'progname': String(prog.title),
                        'title'   : String(prog.sub_title) }
 
-    filemask = config.TV_RECORDFILE_MASK % filename_array
+    filemask = config.TV_RECORD_FILE_MASK % filename_array
     filemask = time.strftime(filemask, time.localtime(prog.start))
     filename = os.path.join(config.TV_RECORD_DIR,
                             progname2filename(filemask).rstrip(' -_:') +
-                            config.TV_RECORDFILE_SUFFIX)
+                            config.TV_RECORD_FILE_SUFFIX)
     return filename
 
 

Modified: branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy      (original)
+++ branches/rel-1/freevo/src/www/htdocs/edit_favorite.rpy      Fri Oct 19 
03:19:19 2007
@@ -130,9 +130,9 @@
         fv.tableCell(_('Channel'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Day of week'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Time of day'), 'class="guidehead" colspan="1"')
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             fv.tableCell(_('Duplicates'), 'class="guidehead" colspan="1"')
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             fv.tableCell(_('Episodes'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Action'), 'class="guidehead" colspan="1"')
         fv.tableRowClose()
@@ -229,7 +229,7 @@
         """
         fv.tableCell(cell, 'class="'+status+'" colspan="1"')
 
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             if hasattr(fav, 'allowDuplicates'):
                 cell = '\n<select name="allowDuplicates" selected="%s">\n' % \
                 fav.allowDuplicates
@@ -240,7 +240,7 @@
             cell += '</select>\n'
             fv.tableCell(cell, 'class="'+status+'" colspan="1"')
 
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             if hasattr(fav, 'onlyNew'):
                 cell = '\n<select name="onlyNew" selected="%s">\n' % 
fav.onlyNew
             else:

Modified: branches/rel-1/freevo/src/www/htdocs/favorites.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/favorites.rpy  (original)
+++ branches/rel-1/freevo/src/www/htdocs/favorites.rpy  Fri Oct 19 03:19:19 2007
@@ -68,9 +68,9 @@
         priority = fv.formValue(form, 'priority')
         allowDuplicates = 1
         onlyNew = 0
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             allowDuplicates = fv.formValue(form, 'allowDuplicates')
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             onlyNew = fv.formValue(form, 'onlyNew')
 
         if action == 'remove':
@@ -107,9 +107,9 @@
         fv.tableCell(_('Channel'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Day of week'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Time of day'), 'class="guidehead" colspan="1"')
-        if config.DUPLICATE_DETECTION:
+        if config.TV_RECORD_DUPLICATE_DETECTION:
             fv.tableCell(_('Duplicates'), 'class="guidehead" colspan="1"')
-        if config.ONLY_NEW_DETECTION:
+        if config.TV_RECORD_ONLY_NEW_DETECTION:
             fv.tableCell(_('Episodes'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Actions'), 'class="guidehead" colspan="1"')
         fv.tableCell(_('Priority'), 'class="guidehead" colspan="1"')
@@ -148,7 +148,7 @@
                 cell = _('ANY')
             fv.tableCell(cell, 'class="'+status+'" colspan="1"')
 
-            if config.DUPLICATE_DETECTION:
+            if config.TV_RECORD_DUPLICATE_DETECTION:
                 (tempStatus, tempFav) = ri.getFavorite(fav.title)
                 if hasattr(tempFav,'allowDuplicates') and 
int(tempFav.allowDuplicates) == 1:
                     cell = 'ALLOW'
@@ -158,7 +158,7 @@
                     cell = 'NONE'
                 fv.tableCell(cell, 'class="'+status+'" colspan="1"')
 
-            if config.ONLY_NEW_DETECTION:
+            if config.TV_RECORD_ONLY_NEW_DETECTION:
                 (tempStatus, tempFav) = ri.getFavorite(fav.title)
                 if hasattr(tempFav,'onlyNew') and int(tempFav.onlyNew) == 1:
                     cell = 'ONLY NEW'

Modified: branches/rel-1/freevo/src/www/htdocs/guide.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/guide.rpy      (original)
+++ branches/rel-1/freevo/src/www/htdocs/guide.rpy      Fri Oct 19 03:19:19 2007
@@ -105,7 +105,7 @@
             retval += '<option value="' + str(myoff) + '"'
             if (abs(gstart - hrinc) < 60):
                 retval += ' SELECTED '
-            retval += '>' + time.strftime(config.TV_TIMEFORMAT, 
time.localtime(hrinc)) + '\n'
+            retval += '>' + time.strftime(config.TV_TIME_FORMAT, 
time.localtime(hrinc)) + '\n'
             hrinc += config.WWW_GUIDE_INTERVAL * 60
         retval += '</select>\n'
         return retval
@@ -173,7 +173,7 @@
                 for i in range(n_cols):
                     if i == n_cols-1 or i == 0:
                         dacell = ''
-                        datime = time.strftime(config.TV_TIMEFORMAT, 
time.localtime(headerstart))
+                        datime = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(headerstart))
                         if i == n_cols-1:
                             dacell = datime + '&nbsp;&nbsp;<a 
href="guide.rpy?stime=%i">&raquo;</a>' % mfrnextguide
                         else:
@@ -183,7 +183,7 @@
                                 dacell = datime
                         fv.tableCell(dacell, 'class="guidehead"  colspan="%d"' 
% cpb)
                     else:
-                        fv.tableCell(time.strftime(config.TV_TIMEFORMAT, 
time.localtime(headerstart)),
+                        fv.tableCell(time.strftime(config.TV_TIME_FORMAT, 
time.localtime(headerstart)),
                                      'class="guidehead" colspan="%d"' % cpb)
                     headerstart += INTERVAL
                 fv.tableRowClose()

Modified: branches/rel-1/freevo/src/www/htdocs/index.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/index.rpy      (original)
+++ branches/rel-1/freevo/src/www/htdocs/index.rpy      Fri Oct 19 03:19:19 2007
@@ -48,7 +48,7 @@
         fv.res += '<div id="contentmain">\n'
 
         fv.res += '<br/><br/><h2>'+( _('Freevo Web Status as of %s') % \
-                time.strftime('%B %d ' + config.TV_TIMEFORMAT, 
time.localtime()) ) +'</h2>'
+                time.strftime('%B %d ' + config.TV_TIME_FORMAT, 
time.localtime()) ) +'</h2>'
 
         (server_available, schedule) = tv.record_client.connectionTest()
         if not server_available:

Modified: branches/rel-1/freevo/src/www/htdocs/proginfo.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/proginfo.rpy   (original)
+++ branches/rel-1/freevo/src/www/htdocs/proginfo.rpy   Fri Oct 19 03:19:19 2007
@@ -76,8 +76,8 @@
         #if config.LOCALE.lower() != 'utf8' and config.LOCALE.lower() != 
'utf-8':
         #    title = title.encode('ascii', 'ignore')
         #    desc = desc.encode('ascii', 'ignore')
-        start = time.strftime(config.TV_TIMEFORMAT, time.localtime(prog.start))
-        stop = time.strftime(config.TV_TIMEFORMAT, time.localtime(prog.stop))
+        start = time.strftime(config.TV_TIME_FORMAT, 
time.localtime(prog.start))
+        stop = time.strftime(config.TV_TIME_FORMAT, time.localtime(prog.stop))
         fv.res += u"<script>\n"
         fv.res += u"var doc = parent.top.document;\n"
         fv.res += u"doc.getElementById('program-title').innerHTML = 
'"+Unicode(title).replace("'", "\\'")+"';\n"

Modified: branches/rel-1/freevo/src/www/htdocs/record.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/record.rpy     (original)
+++ branches/rel-1/freevo/src/www/htdocs/record.rpy     Fri Oct 19 03:19:19 2007
@@ -135,8 +135,8 @@
                 pass
 
             fv.tableRowOpen('class="chanrow"')
-            fv.tableCell(time.strftime('%b %d ' + config.TV_TIMEFORMAT, 
time.localtime(prog.start)), 'class="'+status+'" colspan="1"')
-            fv.tableCell(time.strftime('%b %d ' + config.TV_TIMEFORMAT, 
time.localtime(prog.stop)), 'class="'+status+'" colspan="1"')
+            fv.tableCell(time.strftime('%b %d ' + config.TV_TIME_FORMAT, 
time.localtime(prog.start)), 'class="'+status+'" colspan="1"')
+            fv.tableCell(time.strftime('%b %d ' + config.TV_TIME_FORMAT, 
time.localtime(prog.stop)), 'class="'+status+'" colspan="1"')
 
             chan = tv_util.get_chan_displayname(prog.channel_id)
             if not chan: chan = _('UNKNOWN')

Modified: branches/rel-1/freevo/src/www/htdocs/search.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/search.rpy     (original)
+++ branches/rel-1/freevo/src/www/htdocs/search.rpy     Fri Oct 19 03:19:19 2007
@@ -113,8 +113,8 @@
 
 
                 fv.tableRowOpen('class="chanrow"')
-                fv.tableCell(time.strftime('%b %d ' + config.TV_TIMEFORMAT, 
time.localtime(prog.start)), 'class="'+status+'" colspan="1"')
-                fv.tableCell(time.strftime('%b %d ' + config.TV_TIMEFORMAT, 
time.localtime(prog.stop)), 'class="'+status+'" colspan="1"')
+                fv.tableCell(time.strftime('%b %d ' + config.TV_TIME_FORMAT, 
time.localtime(prog.start)), 'class="'+status+'" colspan="1"')
+                fv.tableCell(time.strftime('%b %d ' + config.TV_TIME_FORMAT, 
time.localtime(prog.stop)), 'class="'+status+'" colspan="1"')
 
                 chan = tv_util.get_chan_displayname(prog.channel_id)
                 if not chan: chan = 'UNKNOWN'

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to