Index: includes/programs.php
===================================================================
--- includes/programs.php	(revision 8314)
+++ includes/programs.php	(working copy)
@@ -116,8 +116,10 @@
                  .' UNIX_TIMESTAMP(program.endtime) AS endtime_unix,'
                  .' CONCAT(repeat('.escape(star_character).', program.stars * '.escape(max_stars).'), IF((program.stars * '.escape(max_stars).' * 10) % 10, "&frac12;", "")) AS starstring,'
                  .' IFNULL(programrating.system, "") AS rater,'
-                 .' IFNULL(programrating.rating, "") AS rating'
-                 .' FROM program LEFT JOIN programrating USING (chanid, starttime)'
+                 .' IFNULL(programrating.rating, "") AS rating,'
+                 .' oldrecorded.recstatus'
+                 .' FROM (program LEFT JOIN oldrecorded USING (seriesid, programid))'
+		 .' LEFT JOIN programrating USING (chanid, starttime)'
                  .' WHERE';
     // Only loading a single channel worth of information
         if ($chanid > 0)
@@ -309,9 +311,6 @@
             $this->auto_expire  = ($progflags & 0x04) ? true : false;    // FL_AUTOEXP   = 0x04
             $this->is_editing   = ($progflags & 0x08) ? true : false;    // FL_EDITING   = 0x08
             $this->bookmark     = ($progflags & 0x10) ? true : false;    // FL_BOOKMARK  = 0x10
-        // Turn recstatus into a word
-            if (isset($this->recstatus) && $GLOBALS['RecStatus_Types'][$this->recstatus])
-                $this->recstatus = $GLOBALS['RecStatus_Types'][$this->recstatus];
         // Add a generic "will record" variable, too
             $this->will_record = ($this->rectype && $this->rectype != rectype_dontrec) ? true : false;
         }
@@ -343,6 +342,7 @@
             $this->colorcode               = $data['colorcode'];
             $this->syndicatedepisodenumber = $data['syndicatedepisodenumber'];
             $this->title_pronounce         = $data['title_pronounce'];
+            $this->recstatus               = $data['recstatus'];
 
             if ($program_data['tsdefault']) {
                 $this->timestretch = $program_data['tsdefault'];
@@ -350,6 +350,11 @@
                 $this->timestretch = 1.0;
             }
         }
+
+    // Turn recstatus into a word
+        if (isset($this->recstatus) && $GLOBALS['RecStatus_Types'][$this->recstatus])
+            $this->recstatus = $GLOBALS['RecStatus_Types'][$this->recstatus];
+
     // No longer a null column, so check for blank entries
         if ($this->airdate == '0000-00-00')
             $this->airdate = NULL;
Index: includes/css.php
===================================================================
--- includes/css.php	(revision 8314)
+++ includes/css.php	(working copy)
@@ -47,7 +47,7 @@
     status.
 */
     function recstatus_class(&$item) {
-        if ($item->recordid && !strcasecmp(get_class($item), 'program')) {
+        if ($item->recstatus && !strcasecmp(get_class($item), 'program')) {
             switch ($item->recstatus) {
                 case 'ForceRecord':
                     return 'record_override_record';
@@ -58,6 +58,7 @@
                     return 'record_conflicting';
                 case 'PreviousRecording':
                 case 'CurrentRecording':
+                case 'Recorded':
                     return 'record_duplicate';
                 case 'ManualOverride':
                 case 'Cancelled':
