Ticket #4: mythweb.transcoders.diff
File mythweb.transcoders.diff, 13.5 KB (added by , 19 years ago) |
---|
-
mythweb/program_detail.php
106 106 $schedule->maxepisodes = intval($_POST['maxepisodes']); 107 107 $schedule->startoffset = intval($_POST['startoffset']); 108 108 $schedule->endoffset = intval($_POST['endoffset']); 109 $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0; 110 $schedule->transcoder = $_POST['transcoder']; 109 111 // Back up the program type, and save the schedule 110 112 $schedule->save($type); 111 113 } … … 115 117 // auto-commercial-flag 116 118 if (!isset($schedule->autocommflag)) 117 119 $schedule->autocommflag = get_backend_setting('AutoCommercialFlag'); 120 // auto-transcode 121 if (!isset($schedule->autotranscode)) 122 $schedule->autotranscode = get_backend_setting('AutoTranscode'); 123 // transcoder 124 if (!isset($schedule->transcoder)) 125 $schedule->transcoder = get_backend_setting('DefaultTranscoder'); 118 126 // recpriority 119 127 if (!isset($schedule->recpriority)) { 120 128 $result = mysql_query('SELECT recpriority from channel where chanid='.escape($program->chanid)); -
mythweb/schedule_manually.php
77 77 $schedule->search = searchtype_manual; 78 78 $schedule->findday = date('w', $schedule->starttime); 79 79 $schedule->findtime = date('H:m:s', $schedule->starttime); 80 $schedule->autotranscode = $_POST['autotranscode'] ? 1 : 0; 81 $schedule->transcoder = $_POST['transcoder']; 80 82 // Figure out the title 81 83 if (strcasecmp($_POST['title'], 'use callsign') == 0) { 82 84 if (prefer_channum) … … 115 117 // auto-commercial-flag 116 118 if (!isset($schedule->autocommflag)) 117 119 $schedule->autocommflag = get_backend_setting('AutoCommercialFlag'); 120 // auto-transcode 121 if (!isset($schedule->autotranscode)) 122 $schedule->autotranscode = get_backend_setting('AutoTranscode'); 123 // transcoder 124 if (!isset($schedule->transcoder)) 125 $schedule->transcoder = get_backend_setting('DefaultTranscoder'); 118 126 // recpriority 119 127 if (!isset($schedule->recpriority)) { 120 128 $result = mysql_query('SELECT recpriority from channel where chanid='.escape($program->chanid)); -
mythweb/themes/Default/schedule_manually.php
100 100 <dl class="clearfix"> 101 101 <dt><?php echo t('Recording Profile') ?>:</dt> 102 102 <dd><?php profile_select($schedule->profile) ?></dd> 103 <dt><?php echo t('Transcoder') ?>:</dt> 104 <dd><?php transcoder_select($schedule->transcoder) ?></dd> 103 105 <dt><?php echo t('Recording Group') ?>:</dt> 104 106 <dd><?php recgroup_select($schedule->recgroup) ?></dd> 105 107 <dt><?php echo t('Recording Priority') ?>:</dt> … … 151 153 ?></select></dd> 152 154 <dt><? echo t('Auto-flag commercials') ?>:</dt> 153 155 <dd><input type="checkbox" class="radio" name="autocommflag"<?php if ($schedule->autocommflag) echo ' CHECKED' ?> value="1" /></dd> 156 <dt><? echo t('Auto-transcode') ?>:</dt> 157 <dd><input type="checkbox" class="radio" name="autotranscode"<?php if ($schedule->autotranscode) echo ' CHECKED' ?> value="1" /></dd> 154 158 <dt><? echo t('Auto-expire recordings') ?>:</dt> 155 159 <dd><input type="checkbox" class="radio" name="autoexpire"<?php if ($schedule->autoexpire) echo ' CHECKED' ?> value="1" /></dd> 156 160 <dt><? echo t('Record new and expire old') ?>:</dt> -
mythweb/themes/Default/program_detail.php
283 283 <dl class="clearfix"> 284 284 <dt><?php echo t('Recording Profile') ?>:</dt> 285 285 <dd><?php profile_select($schedule->profile) ?></dd> 286 <dt><?php echo t('Transcoder') ?>:</dt> 287 <dd><?php transcoder_select($schedule->transcoder) ?></dd> 286 288 <dt><?php echo t('Recording Group') ?>:</dt> 287 289 <dd><?php recgroup_select($schedule->recgroup) ?></dd> 288 290 <dt><?php echo t('Recording Priority') ?>:</dt> … … 334 336 ?></select></dd> 335 337 <dt><? echo t('Auto-flag commercials') ?>:</dt> 336 338 <dd><input type="checkbox" class="radio" name="autocommflag"<?php if ($schedule->autocommflag) echo ' CHECKED' ?> value="1" /></dd> 339 <dt><? echo t('Auto-transcode') ?>:</dt> 340 <dd><input type="checkbox" class="radio" name="autotranscode"<?php if ($schedule->autotranscode) echo ' CHECKED' ?> value="1" /></dd> 337 341 <dt><? echo t('Auto-expire recordings') ?>:</dt> 338 342 <dd><input type="checkbox" class="radio" name="autoexpire"<?php if ($schedule->autoexpire) echo ' CHECKED' ?> value="1" /></dd> 339 343 <dt><? echo t('Record new and expire old') ?>:</dt> -
mythweb/themes/Default/recording_schedules.php
35 35 <td><?php echo get_sort_link('title', t('title')) ?></td> 36 36 <td><?php echo get_sort_link(prefer_channum ? 'channum' : 'callsign', t('channel')) ?></td> 37 37 <td><?php echo get_sort_link('profile', t('profile')) ?></td> 38 <td><?php echo get_sort_link('transcoder', t('transcoder')) ?></td> 38 39 <td><?php echo get_sort_link('recgroup', t('recgroup')) ?></td> 39 40 <td><?php echo get_sort_link('type', t('type')) ?></td> 40 41 </tr><?php … … 118 119 echo $schedule->channel->name; 119 120 ?></td> 120 121 <td nowrap><?php echo _or($schedule->profile, ' ') ?></td> 122 <td nowrap> 123 <?php 124 global $Transcoders; 125 echo _or($Transcoders[$schedule->transcoder], ' ') 126 ?> 127 </td> 121 128 <td nowrap><?php echo _or($schedule->recgroup, ' ') ?></td> 122 129 <td nowrap><?php echo $schedule->texttype ?></td> 123 130 </tr><?php -
mythweb/includes/recording_schedules.php
76 76 } 77 77 } 78 78 79 // Transcoder names 80 global $Transcoders; 81 $Transcoders = array(); 82 $Transcoders[0] = 'Autodetect'; 83 $result = mysql_query('SELECT r.id,r.name' 84 .' FROM recordingprofiles r,profilegroups p' 85 .' WHERE cardtype = "TRANSCODE"' 86 .' AND r.profilegroup = p.id') 87 or trigger_error('SQL Error: '.mysql_error(), FATAL); 88 while ($row = mysql_fetch_assoc($result)) { 89 if ($row['name'] != "RTjpeg/MPEG4" && $row['name'] != "MPEG2") { 90 $Transcoders[$row['id']] = $row['name']; 91 } 92 } 93 mysql_free_result($result); 94 79 95 // 80 96 // Recording Schedule class 81 97 // … … 114 130 var $findday; 115 131 var $findtime; 116 132 var $findid; 133 var $transcoder; 117 134 118 135 var $texttype; 119 136 var $channel; … … 162 179 // Add a generic "will record" variable, too 163 180 $this->will_record = ($this->type && $this->type != rectype_dontrec) ? true : false; 164 181 165 // Turn type int a word182 // Turn type into a word 166 183 $this->texttype = $GLOBALS['RecTypes'][$this->type]; 167 184 168 185 // Do we have a chanid? Load some info about it … … 203 220 // Update the type, in case it changed 204 221 $this->type = $new_type; 205 222 // Update the record 206 $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 ('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 (' 207 224 .escape($this->recordid, true) .',' 208 225 .escape($this->type) .',' 209 226 .escape($this->chanid) .',' … … 233 250 .escape($this->autocommflag) .',' 234 251 .escape($this->findday) .',' 235 252 .escape($this->findtime) .',' 236 .escape($this->findid) .')') 253 .escape($this->findid) .',' 254 .escape($this->autotranscode) .',' 255 .escape($this->transcoder) .')') 237 256 or trigger_error('SQL Error: '.mysql_error(), FATAL); 238 257 // Get the id that was returned 239 258 $recordid = mysql_insert_id(); … … 364 383 ."\t<dd>".htmlentities($this->profile, ENT_COMPAT, 'UTF-8') 365 384 ."</dd>\n"; 366 385 } 386 // Transcoder 387 if (preg_match('/\\S/', $this->transcoder)) { 388 $str .= "\t<dt>".t('Transcoder').":</dt>\n" 389 ."\t<dd>".htmlentities($this->transcoder, ENT_COMPAT, 'UTF-8') 390 ."</dd>\n"; 391 } 367 392 // Recording Group 368 393 if (!empty($this->recgroup)) { 369 394 $str .= "\t<dt>".t('Recording Group').":</dt>\n" … … 393 418 } 394 419 395 420 /* 421 transcoder_select: 422 prints a <select> of the various transcoders to choose from 423 */ 424 function transcoder_select($this_transcoder, $name='transcoder') { 425 global $Transcoders; 426 echo "<select name=\"$name\">"; 427 foreach ($Transcoders as $transcoderid => $transcoder) { 428 echo '<option value="'.htmlentities($transcoderid).'"'; 429 if ($this_transcoder == $transcoderid) { 430 echo ' SELECTED'; 431 } 432 echo '>'.htmlentities($transcoder).'</option>'; 433 } 434 echo '</select>'; 435 } 436 437 /* 396 438 recgroup_select: 397 439 prints a <select> of the various recgroups available 398 440 */ -
mythweb/includes/sorting.php
180 180 return ($a->profile > $b->profile) ? 1 : -1; 181 181 } 182 182 183 function by_transcoder(&$a, &$b) { 184 if ($a->transcoder == $b->transcoder) return 0; 185 return ($a->transcoder > $b->transcoder) ? 1 : -1; 186 } 183 187 184 188 ?> -
mythweb/languages/English.php
17 17 // Shared Terms 18 18 '$1 min' => '', 19 19 '$1 mins' => '', 20 '$1 programs, using $2 ($3) out of $4 .'=> '',20 '$1 programs, using $2 ($3) out of $4 ($5 free).' => '', 21 21 '$1 to $2' => '', 22 22 'Advanced Options' => '', 23 23 'Airtime' => '', 24 24 'All recordings' => '', 25 25 'Auto-expire recordings' => '', 26 26 'Auto-flag commercials' => '', 27 'Auto-transcode' => '', 27 28 'Backend Status' => '', 28 29 'Cancel this schedule.' => '', 29 30 'Category' => '', … … 71 72 'Subtitle and Description' => '', 72 73 'The requested recording schedule has been deleted.' => '', 73 74 'Title' => '', 75 'Transcoder' => '', 74 76 'Unknown' => '', 75 77 'Update Recording Settings' => '', 76 78 'Yes' => '', … … 196 198 'No recording schedules have been defined.' => '', 197 199 'channel' => '', 198 200 'profile' => '', 201 'transcoder' => '', 199 202 'type' => '', 200 203 // themes/.../schedule_manually.php 201 204 'Save Schedule' => '',