Index: themes/Default/program_detail.php
===================================================================
--- themes/Default/program_detail.php	(revision 6786)
+++ themes/Default/program_detail.php	(working copy)
@@ -294,6 +294,31 @@
                         echo ">$i</option>";
                     }
                     ?></select></dd>
+                <dt><?php echo t('Time Stretch Default') ?>:</dt>
+                <dd>
+                    <select name="timestretch">
+                <?php
+                    $tsstep = 0.05;
+                    for ($tscount = 0.5; $tscount < 2.01; $tscount += $tsstep) {
+                        $matches = fequals($schedule->tsdefault, $tscount);
+
+                        if (!$matches &&
+                                $schedule->tsdefault < $tscount &&
+                                $schedule->tsdefault > $tscount - $tsstep) {
+                            printf('<option value="%01.2f" selected>%01.2f' .
+                                    "</option>\n", $schedule->tsdefault,
+                                    $schedule->tsdefault);
+                        }
+
+                        printf('<option value="%01.2f"', $tscount);
+                        if ($matches) {
+                            echo ' selected';
+                        }
+                        printf(">%01.2f</option>\n", $tscount);
+                    }
+                ?>
+                    </select>
+                </dd>
                 <dt><?php echo t('Check for duplicates in') ?>:</dt>
                 <dd><select name="dupin"><?php
                         echo '<option value="1"';
Index: includes/mythbackend.php
===================================================================
--- includes/mythbackend.php	(revision 6786)
+++ includes/mythbackend.php	(working copy)
@@ -14,12 +14,12 @@
 
 // MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h
 // and should be the current MythTV protocol version.
-    define('MYTH_PROTO_VERSION', 17);
+    define('MYTH_PROTO_VERSION', 18);
 
 // NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is
 // the number of items in a ProgramInfo QStringList group used by
 // ProgramInfo::ToSringList and ProgramInfo::FromStringList.
-    $NUMPROGRAMLINES = 39;
+    $NUMPROGRAMLINES = 40;
 
 // Keep track of the master backend port/ip
     $Master_Host = get_backend_setting('MasterServerIP');
@@ -265,6 +265,7 @@
                      $show->starttime,    // dummy lastmodified
                      '0',                 // dummy stars
                      $show->starttime,    // dummy org airdate
+                     '',                  // dummy timestretch
                      '',                  // trailing separator
                     );
         $lastmodified = strtotime(backend_command($cmd));
Index: includes/programs.php
===================================================================
--- includes/programs.php	(revision 6786)
+++ includes/programs.php	(working copy)
@@ -230,6 +230,8 @@
     var $starstring;
     var $is_movie;
 
+    var $timestretch;
+
     var $credits = array();
 
     function Program($data) {
@@ -295,6 +297,8 @@
             $this->lastmodified  = $data[35];
             $this->recpriority   = $data[36];
             #$this->airdate      = $data[37];
+            #$this->hasairdate   = $data[38];
+            $this->timestretch = $program_data[39];
         // Assign the program flags
             $this->has_commflag = ($progflags & 0x01) ? true : false;    // FL_COMMFLAG  = 0x01
             $this->has_cutlist  = ($progflags & 0x02) ? true : false;    // FL_CUTLIST   = 0x02
@@ -335,6 +339,12 @@
             $this->colorcode               = $data['colorcode'];
             $this->syndicatedepisodenumber = $data['syndicatedepisodenumber'];
             $this->title_pronounce         = $data['title_pronounce'];
+
+            if ($program_data['tsdefault']) {
+                $this->timestretch = $program_data['tsdefault'];
+            } else {
+                $this->timestretch = 1.0;
+            }
         }
     // No longer a null column, so check for blank entries
         if ($this->airdate == '0000-00-00')
Index: includes/utils.php
===================================================================
--- includes/utils.php	(revision 6786)
+++ includes/utils.php	(working copy)
@@ -248,3 +248,9 @@
         }
     }
 
+    function fequals($lhs, $rhs) {
+        $epsilon = 1e-3;
+        return abs($lhs - $rhs) <= $epsilon * abs($lhs);
+    }
+
+?>
Index: includes/recording_schedules.php
===================================================================
--- includes/recording_schedules.php	(revision 6786)
+++ includes/recording_schedules.php	(working copy)
@@ -119,6 +119,7 @@
     var $channel;
     var $will_record = false;
     var $class;         // css class, based on category and/or category_type
+    var $tsdefault;
 
     function Schedule($data) {
     // Schedule object data -- just copy it into place
@@ -136,6 +137,7 @@
         }
     // Empty Schedule
         elseif (is_null($data)) {
+            $this->tsdefault = defined('default_rec_ts') ? default_rec_ts : 1.0;
             return;
         }
     // Something else
@@ -203,7 +205,7 @@
     // Update the type, in case it changed
         $this->type = $new_type;
     // Update the record
-        $result = mysql_query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,title,subtitle,description,profile,recpriority,category,maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,findday,findtime,findid) values ('
+        $result = mysql_query('REPLACE INTO record (recordid,type,chanid,starttime,startdate,endtime,enddate,search,title,subtitle,description,profile,recpriority,category,maxnewest,inactive,maxepisodes,autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin,station,seriesid,programid,autocommflag,findday,findtime,findid,tsdefault) values ('
                                 .escape($this->recordid, true)             .','
                                 .escape($this->type)                       .','
                                 .escape($this->chanid)                     .','
@@ -233,7 +235,8 @@
                                 .escape($this->autocommflag)               .','
                                 .escape($this->findday)                    .','
                                 .escape($this->findtime)                   .','
-                                .escape($this->findid)                     .')')
+                                .escape($this->findid)                     .','
+                                .escape($this->tsdefault)                  .')')
             or trigger_error('SQL Error: '.mysql_error(), FATAL);
     // Get the id that was returned
         $recordid = mysql_insert_id();
Index: program_detail.php
===================================================================
--- program_detail.php	(revision 6786)
+++ program_detail.php	(working copy)
@@ -106,6 +106,8 @@
             $schedule->maxepisodes  = intval($_POST['maxepisodes']);
             $schedule->startoffset  = intval($_POST['startoffset']);
             $schedule->endoffset    = intval($_POST['endoffset']);
+            $schedule->tsdefault = $_POST['timestretch'];
+
         // Back up the program type, and save the schedule
             $schedule->save($type);
         }
