Index: mythweb/modules/tv/tmpl/default/recorded.php
===================================================================
--- mythweb/modules/tv/tmpl/default/recorded.php	(revision 11810)
+++ mythweb/modules/tv/tmpl/default/recorded.php	(working copy)
@@ -236,6 +236,9 @@
     $prev_group = '';
     $cur_group  = '';
 
+    $rows_per_entry = $_SESSION['recorded_descunder'] ? 3 : 2;
+    $buttons_under = TRUE;
+
     foreach ($All_Shows as $show) {
 
     // Print a dividing row if grouping changes
@@ -266,9 +269,9 @@
 
         echo "<tr id=\"inforow_$row\" class=\"recorded\">\n";
         if ($group_field != "")
-            echo "\t<td class=\"list\" rowspan=\"".($_SESSION['recorded_descunder'] ? 3 : 2)."\">&nbsp;</td>\n";
+            echo "\t<td class=\"list\" rowspan=\"".$rows_per_entry."\">&nbsp;</td>\n";
         if ($_SESSION['recorded_pixmaps']) {
-            echo "\t<td rowspan=\"".($_SESSION['recorded_descunder'] ? 3 : 2).'">';
+            echo "\t<td rowspan=\"".$rows_per_entry.'">';
             if (file_exists(cache_dir.'/'.basename($show->filename).'.png')) {
                 list($width, $height, $type, $attr) = getimagesize(cache_dir.'/'.basename($show->filename).'.png');
                 echo "<a href=\"$show->url\" name=\"$row\">"
@@ -297,10 +300,12 @@
     <td nowrap align="center"><?php echo strftime($_SESSION['date_recorded'], $show->starttime) ?></td>
     <td nowrap><?php echo nice_length($show->length) ?></td>
     <td nowrap><?php echo nice_filesize($show->filesize) ?></td>
-<?php   if ($show->endtime > time()) { ?>
+<?php
+    if (!$buttons_under) {
+        if ($show->endtime > time()) { ?>
     <td width="5%">currently recording</td>
 <?php   } else { ?>
-    <td width="5%" rowspan="<?php echo $_SESSION['recorded_descunder'] ? 2 : 1 ?>" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+    <td width="5%" rowspan="<?php echo $rows_per_entry - 1 ?>" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
         <a id="delete_<?php echo $row ?>"
             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>"
             js_href="javascript:confirm_delete(<?php echo $row ?>, false)";
@@ -308,28 +313,66 @@
             ><?php echo t('Delete') ?></a>
     </td>
 <?php   }
+    }
 
         if ($_SESSION['recorded_descunder'])
             echo("</tr><tr id=\"descunderrow_".$row."\" class=\"recorded\">\n\t<td colspan=\"" . (6 + $recgroup_cols) . "\">".$show->description."</td>\n");
 ?>
-</tr><tr id="statusrow_<?php echo $row ?>" class="recorded">
-    <td nowrap colspan="<?php echo 6 + ($_SESSION['recorded_descunder'] ? 0 : 1) + $recgroup_cols ?>" align="center">
-        <span style="padding-right: 25px"><?php echo t('has commflag') ?>:&nbsp;
-            <b><?php echo $show->has_commflag ? t('Yes') : t('No') ?></b></span>
-        <span style="padding-right: 25px"><?php echo t('has cutlist') ?>:&nbsp;
-            <b><?php echo $show->has_cutlist ? t('Yes') : t('No') ?></b></span>
-        <span style="padding-right: 25px"><?php echo t('is editing') ?>:&nbsp;
-            <b><?php echo $show->is_editing ? t('Yes') : t('No') ?></b></span>
-        <span style="padding-right: 25px"><?php echo t('auto-expire') ?>:&nbsp;
+ </tr><tr id="statusrow_<?php echo $row ?>" class="recorded"><td colspan="<?php echo 6 + ($_SESSION['recorded_descunder'] ? 0 : 1) + $recgroup_cols ?>">
+ <table width="100%" cellspacing="2" cellpadding="1"><tr>
+     <td align="center"><?php echo t('has commflag') ?>:&nbsp;
+             <b><?php echo $show->has_commflag ? t('Yes') : t('No') ?></b></td>
+     <td align="center"><?php echo t('has cutlist') ?>:&nbsp;
+             <b><?php echo $show->has_cutlist ? t('Yes') : t('No') ?></b></td>
+     <td align="center"><?php echo t('is editing') ?>:&nbsp;
+             <b><?php echo $show->is_editing ? t('Yes') : t('No') ?></b></td>
+     <td align="center"><?php echo t('auto-expire') ?>:&nbsp;
             <input type="checkbox" id="autoexpire_<?php echo $show->chanid, '.', $show->recstartts ?>"
              name="autoexpire_<?php echo $show->chanid, '.', $show->recstartts ?>"
              <?php if ($show->auto_expire) echo ' CHECKED' ?> onclick="set_autoexpire(<?php echo $row ?>)" />
-            </span>
-        <span style="padding-right: 25px"><?php echo t('has bookmark') ?>:&nbsp;
-            <b><?php echo $show->bookmark ? t('Yes') : t('No') ?></b></span>
-        <?php echo t('has been watched') ?>:&nbsp;
-            <b><?php echo $show->is_watched ? t('Yes') : t('No') ?></b>
-        </td>
+             </td>
+     <td align="center"><?php echo t('has bookmark') ?>:&nbsp;
+             <b><?php echo $show->bookmark ? t('Yes') : t('No') ?></b></td>
+      <td align="center"><?php echo t('has been watched') ?>:&nbsp;
+            <b><?php echo $show->is_watched ? t('Yes') : t('No') ?></b></td>
+ 
+ <?php
+     if ($buttons_under) {
+         foreach ($jobs as $k => $desc) {
+ ?>
+         <td class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+             <a id="<?php echo $k.'_'.$row ?>"
+ 		href="<?php echo root ?>tv/recorded?job=<?php echo $k; ?>&chanid=<?php echo $show->chanid; 
+ 			?>&starttime=<?php echo $show->starttime; ?>"
+ 		><?php echo $desc ?></a></td>
+ <?php
+ 	}
+ 
+         if ($show->endtime > time()) { ?>
+     <td width="10%">currently recording</td>
+ <?php   } else { ?>
+     <td width="5%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+         <a id="delete_<?php echo $row ?>"
+             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>"
+             js_href="javascript:confirm_delete(<?php echo $row ?>, false)";
+             title="<?php echo html_entities(t('Delete $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
+             ><?php echo t('Delete') ?></a>
+     </td>
+     <td width="5%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+         <a id="delete_rerecord_<?php echo $row ?>"
+             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>&forget_old"
+             js_href="javascript:confirm_delete(<?php echo $row ?>, true)";
+             title="<?php echo html_entities(t('Delete and rerecord $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
+             ><?php echo t('Delete + Rerecord') ?></a></td>
+     </td>
+ <?php   }
+     }
+ ?>
+     </tr>
+ </table>
+ </td>
+ <?php
+     if (!$buttons_under) { ?>
     <td width="5%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
         <a id="delete_rerecord_<?php echo $row ?>"
             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>&forget_old"
@@ -337,6 +380,7 @@
             title="<?php echo html_entities(t('Delete and rerecord $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
             ><?php echo t('Delete + Rerecord') ?></a></td>
     </td>
+<?php } ?>
 </tr><?php
         $prev_group = $cur_group;
     // Keep track of how many shows are visible in each section
Index: mythweb/modules/tv/tmpl/compact/recorded.php
===================================================================
--- mythweb/modules/tv/tmpl/compact/recorded.php	(revision 11810)
+++ mythweb/modules/tv/tmpl/compact/recorded.php	(working copy)
@@ -236,6 +236,9 @@
     $prev_group = '';
     $cur_group  = '';
 
+    $rows_per_entry = $_SESSION['recorded_descunder'] ? 3 : 2;
+    $buttons_under = TRUE;
+
     foreach ($All_Shows as $show) {
 
     // Print a dividing row if grouping changes
@@ -266,9 +269,9 @@
 
         echo "<tr id=\"inforow_$row\" class=\"recorded\">\n";
         if ($group_field != "")
-            echo "\t<td class=\"list\" rowspan=\"".($_SESSION['recorded_descunder'] ? 3 : 2)."\">&nbsp;</td>\n";
+            echo "\t<td class=\"list\" rowspan=\"".$rows_per_entry."\">&nbsp;</td>\n";
         if ($_SESSION['recorded_pixmaps']) {
-            echo "\t<td rowspan=\"".($_SESSION['recorded_descunder'] ? 3 : 2).'">';
+            echo "\t<td rowspan=\"".$rows_per_entry.'">';
             if (file_exists(cache_dir.'/'.basename($show->filename).'.png')) {
                 list($width, $height, $type, $attr) = getimagesize(cache_dir.'/'.basename($show->filename).'.png');
                 echo "<a href=\"$show->url\" name=\"$row\">"
@@ -297,10 +300,12 @@
     <td nowrap align="center"><?php echo strftime($_SESSION['date_recorded'], $show->starttime) ?></td>
     <td nowrap><?php echo nice_length($show->length) ?></td>
     <td nowrap><?php echo nice_filesize($show->filesize) ?></td>
-<?php   if ($show->endtime > time()) { ?>
+<?php
+    if (!$buttons_under) {
+        if ($show->endtime > time()) { ?>
     <td width="5%">currently recording</td>
 <?php   } else { ?>
-    <td width="5%" rowspan="<?php echo $_SESSION['recorded_descunder'] ? 2 : 1 ?>" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+    <td width="5%" rowspan="<?php echo $rows_per_entry - 1 ?>" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
         <a id="delete_<?php echo $row ?>"
             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>"
             js_href="javascript:confirm_delete(<?php echo $row ?>, false)";
@@ -308,28 +313,66 @@
             ><?php echo t('Delete') ?></a>
     </td>
 <?php   }
+    }
 
         if ($_SESSION['recorded_descunder'])
             echo("</tr><tr id=\"descunderrow_".$row."\" class=\"recorded\">\n\t<td colspan=\"" . (6 + $recgroup_cols) . "\">".$show->description."</td>\n");
 ?>
-</tr><tr id="statusrow_<?php echo $row ?>" class="recorded">
-    <td nowrap colspan="<?php echo 6 + ($_SESSION['recorded_descunder'] ? 0 : 1) + $recgroup_cols ?>" align="center">
-        <span style="padding-right: 25px"><?php echo t('has commflag') ?>:&nbsp;
-            <b><?php echo $show->has_commflag ? t('Yes') : t('No') ?></b></span>
-        <span style="padding-right: 25px"><?php echo t('has cutlist') ?>:&nbsp;
-            <b><?php echo $show->has_cutlist ? t('Yes') : t('No') ?></b></span>
-        <span style="padding-right: 25px"><?php echo t('is editing') ?>:&nbsp;
-            <b><?php echo $show->is_editing ? t('Yes') : t('No') ?></b></span>
-        <span style="padding-right: 25px"><?php echo t('auto-expire') ?>:&nbsp;
+ </tr><tr id="statusrow_<?php echo $row ?>" class="recorded"><td colspan="<?php echo 6 + ($_SESSION['recorded_descunder'] ? 0 : 1) + $recgroup_cols ?>">
+ <table width="100%" cellspacing="2" cellpadding="1"><tr>
+     <td align="center"><?php echo t('has commflag') ?>:&nbsp;
+             <b><?php echo $show->has_commflag ? t('Yes') : t('No') ?></b></td>
+     <td align="center"><?php echo t('has cutlist') ?>:&nbsp;
+             <b><?php echo $show->has_cutlist ? t('Yes') : t('No') ?></b></td>
+     <td align="center"><?php echo t('is editing') ?>:&nbsp;
+             <b><?php echo $show->is_editing ? t('Yes') : t('No') ?></b></td>
+     <td align="center"><?php echo t('auto-expire') ?>:&nbsp;
             <input type="checkbox" id="autoexpire_<?php echo $show->chanid, '.', $show->recstartts ?>"
              name="autoexpire_<?php echo $show->chanid, '.', $show->recstartts ?>"
              <?php if ($show->auto_expire) echo ' CHECKED' ?> onclick="set_autoexpire(<?php echo $row ?>)" />
-            </span>
-        <span style="padding-right: 25px"><?php echo t('has bookmark') ?>:&nbsp;
-            <b><?php echo $show->bookmark ? t('Yes') : t('No') ?></b></span>
-        <?php echo t('has been watched') ?>:&nbsp;
-            <b><?php echo $show->is_watched ? t('Yes') : t('No') ?></b>
-        </td>
+             </td>
+     <td align="center"><?php echo t('has bookmark') ?>:&nbsp;
+             <b><?php echo $show->bookmark ? t('Yes') : t('No') ?></b></td>
+      <td align="center"><?php echo t('has been watched') ?>:&nbsp;
+            <b><?php echo $show->is_watched ? t('Yes') : t('No') ?></b></td>
+ 
+ <?php
+     if ($buttons_under) {
+         foreach ($jobs as $k => $desc) {
+ ?>
+         <td class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+             <a id="<?php echo $k.'_'.$row ?>"
+ 		href="<?php echo root ?>tv/recorded?job=<?php echo $k; ?>&chanid=<?php echo $show->chanid; 
+ 			?>&starttime=<?php echo $show->starttime; ?>"
+ 		><?php echo $desc ?></a></td>
+ <?php
+ 	}
+ 
+         if ($show->endtime > time()) { ?>
+     <td width="10%">currently recording</td>
+ <?php   } else { ?>
+     <td width="5%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+         <a id="delete_<?php echo $row ?>"
+             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>"
+             js_href="javascript:confirm_delete(<?php echo $row ?>, false)";
+             title="<?php echo html_entities(t('Delete $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
+             ><?php echo t('Delete') ?></a>
+     </td>
+     <td width="5%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
+         <a id="delete_rerecord_<?php echo $row ?>"
+             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>&forget_old"
+             js_href="javascript:confirm_delete(<?php echo $row ?>, true)";
+             title="<?php echo html_entities(t('Delete and rerecord $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
+             ><?php echo t('Delete + Rerecord') ?></a></td>
+     </td>
+ <?php   }
+     }
+ ?>
+     </tr>
+ </table>
+ </td>
+ <?php
+     if (!$buttons_under) { ?>
     <td width="5%" class="command command_border_l command_border_t command_border_b command_border_r" align="center">
         <a id="delete_rerecord_<?php echo $row ?>"
             href="<?php echo root ?>tv/recorded?delete=yes&chanid=<?php echo $show->chanid ?>&starttime=<?php echo $show->recstartts ?>&forget_old"
@@ -337,6 +380,7 @@
             title="<?php echo html_entities(t('Delete and rerecord $1', preg_replace('/: $/', '', $show->title.': '.$show->subtitle))) ?>"
             ><?php echo t('Delete + Rerecord') ?></a></td>
     </td>
+<?php } ?>
 </tr><?php
         $prev_group = $cur_group;
     // Keep track of how many shows are visible in each section
Index: mythweb/modules/tv/recorded.php
===================================================================
--- mythweb/modules/tv/recorded.php	(revision 11810)
+++ mythweb/modules/tv/recorded.php	(working copy)
@@ -13,6 +13,8 @@
  *
 /**/
 
+    require_once 'includes/jobqueue.php';
+
 // Populate the $Channels array
     load_all_channels();
 
@@ -53,6 +55,35 @@
         }
     }
 
+    $q = '';
+    for ($i = 1; $i < 5; ++$i) {
+	$q .= ', \'UserJob'.$i.'\', \'UserJobDesc'.$i.'\'';
+    }
+
+    $jobs = array();
+
+    $sh = $db->query('SELECT value, data 
+			FROM settings
+			WHERE hostname IS NULL 
+			AND value IN ('.substr($q, 2).')
+			ORDER BY value');
+
+    while (list($value, $data) = $sh->fetch_row()) {
+	$jobs[$value] = $data;
+    }
+
+    for ($i = 1; $i < 5; ++$i) {
+        if ($jobs['UserJob'.$i])
+	    $jobs[JOB_USERJOBS * $i] = $jobs['UserJobDesc'.$i];
+	unset($jobs['UserJobDesc'.$i]);
+        unset($jobs['UserJob'.$i]);
+    }
+
+    $jobs[JOB_TRANSCODE] = t('Transcode');
+    $jobs[JOB_COMMFLAG] = t('Flag commercials');
+
+    ksort($jobs);
+
 // Load the sorting routines
     require_once "includes/sorting.php";
 
@@ -75,6 +106,21 @@
         /** @todo need some sort of handler here for the non-ajax stuff */
     }
 
+// Queue a job?
+    isset($_GET['job'])    or $_GET['job'] = $_POST['job'];
+    if ($_GET['job'] && $_GET['chanid'] && $_GET['starttime']) {
+        $sh = $db->query('INSERT jobqueue SET chanid=?, starttime=FROM_UNIXTIME(?), inserttime=NOW(),
+                            type=?, hostname=?, args=\'\',
+			    status='.JOB_QUEUED.', statustime=NOW(),
+			    comment=\'Queued by MythWeb\',
+                            flags='.JOB_USE_CUTLIST,
+			 $_GET['chanid'],
+                         $_GET['starttime'],
+                         $_GET['job'],
+                         hostname
+			);
+    }
+
 // Delete a program?
     isset($_GET['forget_old']) or $_GET['forget_old'] = $_POST['forget_old'];
     isset($_GET['delete'])     or $_GET['delete']     = $_POST['delete'];
