Ticket #71: mythweb_autots_2.patch
File mythweb_autots_2.patch, 7.4 KB (added by , 19 years ago) |
---|
-
themes/Default/program_detail.php
296 296 echo ">$i</option>"; 297 297 } 298 298 ?></select></dd> 299 <dt><?php echo t('Time Stretch Default') ?>:</dt> 300 <dd> 301 <select name="timestretch"> 302 <?php 303 $tsstep = 0.05; 304 for ($tscount = 0.5; $tscount < 2.01; $tscount += $tsstep) { 305 $matches = fequals($schedule->tsdefault, $tscount); 306 307 if (!$matches && 308 $schedule->tsdefault < $tscount && 309 $schedule->tsdefault > $tscount - $tsstep) { 310 printf('<option value="%01.2f" selected>%01.2f' . 311 "</option>\n", $schedule->tsdefault, 312 $schedule->tsdefault); 313 } 314 315 printf('<option value="%01.2f"', $tscount); 316 if ($matches) { 317 echo ' selected'; 318 } 319 printf(">%01.2f</option>\n", $tscount); 320 } 321 ?> 322 </select> 323 </dd> 299 324 <dt><?php echo t('Check for duplicates in') ?>:</dt> 300 325 <dd><select name="dupin"><?php 301 326 echo '<option value="1"'; -
includes/mythbackend.php
14 14 15 15 // MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h 16 16 // and should be the current MythTV protocol version. 17 define('MYTH_PROTO_VERSION', 1 7);17 define('MYTH_PROTO_VERSION', 18); 18 18 19 19 // NUMPROGRAMLINES is defined in mythtv/libs/libmythtv/programinfo.h and is 20 20 // the number of items in a ProgramInfo QStringList group used by 21 21 // ProgramInfo::ToSringList and ProgramInfo::FromStringList. 22 $NUMPROGRAMLINES = 39;22 $NUMPROGRAMLINES = 40; 23 23 24 24 // Keep track of the master backend port/ip 25 25 $Master_Host = get_backend_setting('MasterServerIP'); … … 265 265 $show->starttime, // dummy lastmodified 266 266 '0', // dummy stars 267 267 $show->starttime, // dummy org airdate 268 '', // dummy timestretch 268 269 '', // trailing separator 269 270 ); 270 271 $lastmodified = strtotime(backend_command($cmd)); -
includes/programs.php
230 230 var $starstring; 231 231 var $is_movie; 232 232 233 var $timestretch; 234 233 235 var $credits = array(); 234 236 235 237 function Program($data) { … … 295 297 $this->lastmodified = $data[35]; 296 298 $this->recpriority = $data[36]; 297 299 #$this->airdate = $data[37]; 300 #$this->hasairdate = $data[38]; 301 $this->timestretch = $program_data[39]; 298 302 // Assign the program flags 299 303 $this->has_commflag = ($progflags & 0x01) ? true : false; // FL_COMMFLAG = 0x01 300 304 $this->has_cutlist = ($progflags & 0x02) ? true : false; // FL_CUTLIST = 0x02 … … 335 339 $this->colorcode = $data['colorcode']; 336 340 $this->syndicatedepisodenumber = $data['syndicatedepisodenumber']; 337 341 $this->title_pronounce = $data['title_pronounce']; 342 343 if ($program_data['tsdefault']) { 344 $this->timestretch = $program_data['tsdefault']; 345 } else { 346 $this->timestretch = 1.0; 347 } 338 348 } 339 349 // No longer a null column, so check for blank entries 340 350 if ($this->airdate == '0000-00-00') -
includes/utils.php
248 248 } 249 249 } 250 250 251 function fequals($lhs, $rhs) { 252 $epsilon = 1e-3; 253 return abs($lhs - $rhs) <= $epsilon * abs($lhs); 254 } 255 256 ?> -
includes/recording_schedules.php
136 136 var $channel; 137 137 var $will_record = false; 138 138 var $class; // css class, based on category and/or category_type 139 var $tsdefault; 139 140 140 141 function Schedule($data) { 141 142 // Schedule object data -- just copy it into place … … 153 154 } 154 155 // Empty Schedule 155 156 elseif (is_null($data)) { 157 $this->tsdefault = defined('default_rec_ts') ? default_rec_ts : 1.0; 156 158 return; 157 159 } 158 160 // Something else … … 220 222 // Update the type, in case it changed 221 223 $this->type = $new_type; 222 224 // Update the record 223 $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,autotranscode,transcoder ) values ('225 $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,autotranscode,transcoder,tsdefault) values (' 224 226 .escape($this->recordid, true) .',' 225 227 .escape($this->type) .',' 226 228 .escape($this->chanid) .',' … … 252 254 .escape($this->findtime) .',' 253 255 .escape($this->findid) .',' 254 256 .escape($this->autotranscode) .',' 255 .escape($this->transcoder) .')') 257 .escape($this->transcoder) .',' 258 .escape($this->tsdefault) .')') 256 259 or trigger_error('SQL Error: '.mysql_error(), FATAL); 257 260 // Get the id that was returned 258 261 $recordid = mysql_insert_id(); -
program_detail.php
108 108 $schedule->endoffset = intval($_POST['endoffset']); 109 109 $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0; 110 110 $schedule->transcoder = $_POST['transcoder']; 111 $schedule->tsdefault = $_POST['timestretch']; 111 112 // Back up the program type, and save the schedule 112 113 $schedule->save($type); 113 114 }