Ticket #7033: mythweb_recgroup_select.diff
File mythweb_recgroup_select.diff, 2.5 KB (added by , 15 years ago) |
---|
-
mythplugins/mythweb/modules/tv/classes/Schedule.php
class Schedule { 461 461 /** 462 462 * prints a <select> of the various recgroups available 463 463 /**/ 464 function recgroup_select($this_group, $name = 'recgroup') { 464 function recgroup_select(&$schedule, $name = 'recgroup') { 465 $this_group =& $schedule->recgroup; 465 466 static $groups = array(); 466 if (empty($this_group))467 $this_group = 'Default';468 467 // Load the recording groups? 469 468 if (!count($groups)) { 470 469 // Default … … class Schedule { 483 482 } 484 483 mysql_free_result($result); 485 484 } 485 // Guess at default. Try category match etc.. 486 if (count($groups) > 1 && empty($this_group)) { 487 global $db; 488 $program = load_one_program($schedule->starttime, $schedule->chanid, $schedule->manualid); 489 $sh = $db->query('SELECT DISTINCT recgroup FROM record 490 WHERE recgroup REGEXP ? OR recgroup REGEXP ? OR recgroup REGEXP ?', 491 $schedule->category, $program->category_type, $schedule->station); 492 if (list($grp) = $sh->fetch_row()) 493 $this_group = $grp; 494 $sh->finish(); 495 } 496 if (empty($this_group)) 497 $this_group = 'Default'; 486 498 // Print the <select> 487 499 echo "<select name=\"$name\">"; 488 500 foreach($groups as $group => $group_name) { -
mythplugins/mythweb/modules/tv/tmpl/default/_advanced_options.php
53 53 <dt><?php echo t('Transcoder') ?>:</dt> 54 54 <dd><?php transcoder_select($schedule->transcoder) ?></dd> 55 55 <dt><?php echo t('Recording Group') ?>:</dt> 56 <dd><?php recgroup_select($schedule ->recgroup) ?></dd>56 <dd><?php recgroup_select($schedule) ?></dd> 57 57 <dt><?php echo t('Storage Group') ?>:</dt> 58 58 <dd><?php storagegroup_select($schedule->storagegroup) ?></dd> 59 59 <dt><?php echo t('Playback Group') ?>:</dt>