Index: includes/sorting.php
===================================================================
--- includes/sorting.php	(revision 17686)
+++ includes/sorting.php	(working copy)
@@ -161,6 +161,14 @@
         return strnatcasecmp($a->channel->channum, $b->channel->channum);
     }
 
+    function by_originalairdate(&$a, &$b) {
+        return strnatcasecmp($a->airdate, $b->airdate);
+    }
+
+    function by_episodenumber(&$a, &$b) {
+        return strnatcasecmp($a->syndicatedepisodenumber, $b->syndicatedepisodenumber);
+    }
+
     function by_airdate(&$a, &$b) {
         if ($a->starttime == $b->starttime) return 0;
         return ($a->starttime > $b->starttime) ? 1 : -1;
Index: modules/tv/classes/Program.php
===================================================================
--- modules/tv/classes/Program.php	(revision 17686)
+++ modules/tv/classes/Program.php	(working copy)
@@ -335,6 +335,17 @@
     // Get a nice description with the full details
         $details = array();
 
+        if (!isset($this->syndicatedepisodenumber)) {
+        // Get some data from SQL that the backend doesn't provide
+            $query  = 'SELECT partnumber, parttotal, syndicatedepisodenumber FROM program'
+                     .' WHERE chanid='.escape($this->chanid)
+                     .' AND starttime=FROM_UNIXTIME('.escape($this->starttime).')';
+            $result = mysql_query($query)
+                or trigger_error('SQL Error: '.mysql_error(), FATAL);
+            list($this->partnumber, $this->parttotal, $this->syndicatedepisodenumber) = mysql_fetch_row($result);
+            mysql_free_result($result);
+        }
+
         if ($this->hdtv)
             $details[] = t('HDTV');
         if ($this->widescreen)
Index: modules/tv/upcoming.php
===================================================================
--- modules/tv/upcoming.php	(revision 17686)
+++ modules/tv/upcoming.php	(working copy)
@@ -65,6 +65,8 @@
         $_SESSION['scheduled_recordings']['disp_duplicates']  = $_POST['disp_duplicates']  ? true : false;
         $_SESSION['scheduled_recordings']['disp_deactivated'] = $_POST['disp_deactivated'] ? true : false;
         $_SESSION['scheduled_recordings']['disp_conflicts']   = $_POST['disp_conflicts']   ? true : false;
+        $_SESSION['scheduled_recordings']['disp_recgroup']    = $_POST['disp_recgroup'];
+        $_SESSION['scheduled_recordings']['disp_title']       = $_POST['disp_title'];
     }
 
 // Defaults
@@ -81,7 +83,7 @@
     }
 
     if (!is_array($_SESSION['tv']['settings']['screens']['upcoming']))
-        $_SESSION['tv']['settings']['screens']['upcoming'] = array('title' => 'on', 'channel' => 'on', 'recdate' => 'on', 'length' => 'on');
+        $_SESSION['tv']['settings']['screens']['upcoming'] = array('title' => 'on', 'channel' => 'on', 'record date' => 'on', 'length' => 'on');
 
 // Parse the list of scheduled recordings
     global $Scheduled_Recordings;
@@ -91,12 +93,14 @@
         foreach ($shows as $starttime => $show_group) {
         // Parse each show group
             foreach ($show_group as $key => $show) {
+                $Groups[$show->recgroup]++;
             // Skip things we've already recorded (or missed)
                 if ($starttime <= time() && $show->recstatus != 'Recording')
                     continue;
             // Make sure this is a valid show (ie. skip in-progress recordings and other junk)
                 if (!$callsign || $show->length < 1)
                     continue;
+                $Program_Titles[$show->title]++;
             // Skip scheduled shows?
                 if (in_array($show->recstatus, array('WillRecord', 'ForceRecord'))) {
                     if (!$_SESSION['scheduled_recordings']['disp_scheduled'])
@@ -117,6 +121,12 @@
                     if (!$_SESSION['scheduled_recordings']['disp_deactivated'])
                         continue;
                 }
+            // Show specific recgroup only
+                if ($_SESSION['scheduled_recordings']['disp_recgroup'] && $show->recgroup != $_SESSION['scheduled_recordings']['disp_recgroup'])
+                    continue;
+            // Show specific title only
+                if ($_SESSION['scheduled_recordings']['disp_title'] && $show->title != $_SESSION['scheduled_recordings']['disp_title'])
+                    continue;
             // Assign a reference to this show to the various arrays
                 $all_shows[] =& $Scheduled_Recordings[$callsign][$starttime][$key];
             }
@@ -127,6 +137,9 @@
     if (count($all_shows))
         sort_programs($all_shows, 'scheduled_sortby');
 
+    uksort($Groups, 'by_no_articles');
+    uksort($Program_Titles, 'by_no_articles');
+
 // Load the class for this page
     require tmpl_dir.'upcoming.php';
 
Index: modules/tv/tmpl/default/set_screens.php
===================================================================
--- modules/tv/tmpl/default/set_screens.php	(revision 17686)
+++ modules/tv/tmpl/default/set_screens.php	(working copy)
@@ -21,7 +21,7 @@
     <fieldset>
         <legend><?php echo t('Upcoming Recordings'); ?></legend>
         <?php
-            foreach (array('title', 'channel', 'airdate', 'record date', 'length') as $option) {
+            foreach (array('title', 'original airdate', 'episode number', 'channel', 'recording group', 'airdate', 'record date', 'length') as $option) {
                 echo '<input type="checkbox" name="upcoming['.$option.']" id="upcoming['.$option.']" ';
                 if ($_SESSION['tv']['settings']['screens']['upcoming'][$option] == 'on')
                     echo 'checked';
Index: modules/tv/tmpl/default/upcoming.php
===================================================================
--- modules/tv/tmpl/default/upcoming.php	(revision 17686)
+++ modules/tv/tmpl/default/upcoming.php	(working copy)
@@ -99,6 +99,40 @@
         <?php echo t('Conflicts') ?></label>
         </td>
 </tr>
+<tr>
+    <td colspan="5">
+<?php if (count($Groups) > 1) { ?>
+    <select name="disp_recgroup" onchange="$('change_display').submit()">
+        <option id="All groups" value=""><?php echo t('All groups') ?></option><?php
+        foreach($Groups as $recgroup => $count) {
+            echo '<option id="Group '.htmlspecialchars($recgroup).'" value="'.htmlspecialchars($recgroup).'"';
+            if ($_SESSION['scheduled_recordings']['disp_recgroup'] == $recgroup)
+                echo ' SELECTED';
+            echo '>'.html_entities($recgroup)
+                .' ('.tn('$1 episode', '$1 episodes', $count)
+                .')</option>';
+        }
+        ?>
+    </select>
+<?php
+    }
+?>
+    <select name="disp_title" onchange="$('change_display').submit()">
+        <option id="All titles" value="">All titles</option>
+<?php
+        foreach($Program_Titles as $title => $count) {
+            echo '<option id="Title '.htmlspecialchars($title).'" value="'.htmlspecialchars($title).'"';
+            if ($_SESSION['scheduled_recordings']['disp_title'] == $title)
+                echo ' SELECTED';
+            echo '>'.html_entities($title)
+                .($count > 1 ? ' ('.tn('$1 episode', '$1 episodes', $count).')' : "")
+                ."</option>\n";
+        }
+?>
+    </select>
+    </td>
+</tr>
+
 </table>
 
 </form>
@@ -109,8 +143,14 @@
         <th class="x-status"><?php  echo t('Status') ?></th>
     <?php if ($_SESSION['tv']['settings']['screens']['upcoming']['title'] == 'on') { ?>
         <th class="x-title"><?php   echo get_sort_link('title',   t('Title'))   ?></th>
+    <?php } if ($_SESSION['tv']['settings']['screens']['upcoming']['original airdate'] == 'on') { ?>
+        <th class="x-originalairdate"><?php echo get_sort_link('originalairdate', t('Original Airdate')) ?></th>
+    <?php } if ($_SESSION['tv']['settings']['screens']['upcoming']['episode number'] == 'on') { ?>
+        <th class="x-episodenumber"><?php echo get_sort_link('episodenumber', t('Episode Number')) ?></th>
     <?php } if ($_SESSION['tv']['settings']['screens']['upcoming']['channel'] == 'on') { ?>
         <th class="x-channum"><?php echo get_sort_link('channum', t('Channel')) ?></th>
+    <?php } if ($_SESSION['tv']['settings']['screens']['upcoming']['recording group'] == 'on') { ?>
+        <th class="x-recgroup"><?php echo get_sort_link('recgroup', t('Recording Group')) ?></th>
     <?php } if ($_SESSION['tv']['settings']['screens']['upcoming']['airdate'] == 'on') { ?>
         <th class="x-airdate"><?php echo get_sort_link('airdate', t('Airdate')) ?></th>
     <?php } if ($_SESSION['tv']['settings']['screens']['upcoming']['record date'] == 'on') { ?>
@@ -302,7 +342,7 @@
 
         if ( $cur_group != $prev_group && $group_field != '' ) {
 ?><tr class="list_separator">
-    <td colspan="10" class="list_separator"><?php echo $cur_group ?></td>
+    <td colspan="<?php echo 4 + count($_SESSION['tv']['settings']['screens']['upcoming']) ?>" class="list_separator"><?php echo $cur_group ?></td>
 </tr><?php
         }
 
@@ -314,6 +354,10 @@
         if ($_SESSION['tv']['settings']['screens']['upcoming']['title'] == 'on') {
             ?>
                 <td class="x-title <?php echo $show->css_class ?>"><?php
+                    if ($show->hdtv)
+                        echo '<span class="hdtv_icon">HD</span>';
+                    if ($show->starstring)
+                        echo '<span class="starstring" style="float: right">'.$show->starstring.'</span>';
                 // Print the link to edit this scheduled recording
                     echo '<a id="program-'.$show->chanid.'-'.$show->starttime.'"';
                     if ($_SESSION["show_popup_info"]) {
@@ -338,11 +382,26 @@
                 </td>
             <?php
         }
+        if ($_SESSION['tv']['settings']['screens']['upcoming']['original airdate'] == 'on') {
+            ?>
+                <td class="x-originalairdate"><?php echo $show->airdate ?></td>
+            <?php
+        }
+        if ($_SESSION['tv']['settings']['screens']['upcoming']['episode number'] == 'on') {
+            ?>
+                <td class="x-episodenumber"><?php echo $show->syndicatedepisodenumber ?></td>
+            <?php
+        }
         if ($_SESSION['tv']['settings']['screens']['upcoming']['channel'] == 'on') {
             ?>
                 <td class="x-channum"><?php echo $show->channel->channum, ' - ', $show->channel->name ?></td>
             <?php
         }
+        if ($_SESSION['tv']['settings']['screens']['upcoming']['recording group'] == 'on') {
+            ?>
+                <td class="x-recgroup"><?php echo $show->recgroup ?></td>
+            <?php
+        }
         if ($_SESSION['tv']['settings']['screens']['upcoming']['airdate'] == 'on') {
             ?>
                 <td class="x-airdate"><?php echo strftime($_SESSION['date_scheduled'], $show->starttime) ?></td>
Index: skins/default/tv_upcoming.css
===================================================================
--- skins/default/tv_upcoming.css	(revision 17686)
+++ skins/default/tv_upcoming.css	(working copy)
@@ -52,8 +52,14 @@
 }
 #listings th.x-title {
 }
+#listings th.x-originalairdate {
+}
+#listings th.x-episodenumber {
+}
 #listings th.x-channum {
 }
+#listings th.x-recgroup {
+}
 #listings th.x-airdate {
 }
 #listings th.x-length {
@@ -64,8 +70,14 @@
 }
 #listings td.x-title {
 }
+#listings td.x-originalairdate {
+}
+#listings td.x-episodenumber {
+}
 #listings td.x-channum {
 }
+#listings td.x-recgroup {
+}
 #listings td.x-airdate {
     white-space:        nowrap;
 }
