Index: libs/libmythtv/programinfo.h
===================================================================
--- libs/libmythtv/programinfo.h	(revision 20794)
+++ libs/libmythtv/programinfo.h	(working copy)
@@ -321,8 +321,9 @@
 
     // Resolution Set/Get
     void SetResolution(uint width, uint height, long long frame);
+    int GetWidth(void);
     int GetHeight(void);
-    void SetVidpropHeight(int height);
+    void SetVidpropHeight(int width);
 
     // GUI stuff
     void showDetails(void) const;
@@ -359,6 +360,7 @@
     QString chanstr;
     QString chansign;
     QString channame;
+    uint m_videoWidth;
     uint m_videoHeight;
 
     int recpriority;
Index: libs/libmythtv/programinfo.cpp
===================================================================
--- libs/libmythtv/programinfo.cpp	(revision 20794)
+++ libs/libmythtv/programinfo.cpp	(working copy)
@@ -160,6 +160,7 @@
 
     record = NULL;
 
+    m_videoWidth = 0;
     m_videoHeight = 0;
 }
 
@@ -265,6 +266,7 @@
     lastInUseTime = other.lastInUseTime;
     record = NULL;
 
+    m_videoWidth = other.m_videoWidth;
     m_videoHeight = other.m_videoHeight;
 
     positionMapDBReplacement = other.positionMapDBReplacement;
@@ -3099,10 +3101,42 @@
     return m_videoHeight;
 }
 
-/** \fn ProgramInfo::SetVidpropHeight(int height)
+/** \fn ProgramInfo::GetWidth(void) 
+ *  \brief Gets overall average width. 
+ */ 
+int ProgramInfo::GetWidth(void) 
+{ 
+    MSqlQuery query(MSqlQuery::InitCon()); 
+ 
+    query.prepare("SELECT recordedmarkup.DATA FROM recordedmarkup" 
+                  " WHERE recordedmarkup.chanid = :CHANID" 
+                  " AND recordedmarkup.starttime = :STARTTIME" 
+                  " AND recordedmarkup.type = 30" 
+                  " GROUP BY recordedmarkup.data ORDER BY" 
+                  " SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)" 
+                  " FROM recordedmarkup AS rm WHERE rm.chanid = recordedmarkup.chanid" 
+                  " AND rm.starttime = recordedmarkup.starttime AND" 
+                  " rm.type = recordedmarkup.type AND" 
+                  " rm.mark > recordedmarkup.mark" 
+                  " ORDER BY rm.mark ASC LIMIT 1)" 
+                  " - recordedmarkup.mark) DESC LIMIT 1;"); 
+    query.bindValue(":CHANID", chanid); 
+    query.bindValue(":STARTTIME", recstartts); 
+ 
+    if (query.exec() && query.next()) 
+    { 
+        m_videoWidth = query.value(0).toInt(); 
+    } 
+    else 
+        m_videoWidth = 0; 
+
+    return m_videoWidth; 
+} 
+
+/** \fn ProgramInfo::SetVidpropHeight(int width)
  *  \brief Sets overall average height flag in videoprops.
  */
-void ProgramInfo::SetVidpropHeight(int height)
+void ProgramInfo::SetVidpropHeight(int width)
 {
     MSqlQuery query(MSqlQuery::InitCon());
 
@@ -3110,25 +3144,24 @@
     " CONCAT_WS(',', IF(videoprop = '', NULL, videoprop), :VALUE)"
     " WHERE chanid = :CHANID AND starttime = :STARTTIME;");
 
-    if (height > 700 && height < 800)
+    if (width > 1300)
     {
-        VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because height was %1").arg(height));
-        videoproperties |= VID_720;
+        VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because width was %1").arg(width));
+        videoproperties |= VID_1080;
 
-        query.bindValue(":VALUE", "720");
+        query.bindValue(":VALUE", "1080");
         query.bindValue(":CHANID", chanid);
         query.bindValue(":STARTTIME", startts);
 
         if (!query.exec())
             MythDB::DBError("UpdateRes", query);
-
     }
-    else if (height > 1000 && height < 1100)
+    else if (width > 800)
     {
-        VERBOSE(VB_IMPORTANT, QString("Recording designated 1080i/p because height was %1").arg(height));
-        videoproperties |= VID_1080;
+        VERBOSE(VB_IMPORTANT, QString("Recording designated 720p because width was %1").arg(width));
+        videoproperties |= VID_720;
 
-        query.bindValue(":VALUE", "1080");
+        query.bindValue(":VALUE", "720");
         query.bindValue(":CHANID", chanid);
         query.bindValue(":STARTTIME", startts);
 
@@ -3137,11 +3170,11 @@
     }
     else
     {
-        VERBOSE(VB_IMPORTANT, QString("Unknown type, recording height was %1").arg(height));
+        VERBOSE(VB_IMPORTANT, QString("Unknown type, recording width was %1").arg(width));
         return;
     }
 
-    m_videoHeight = height;
+    m_videoWidth = width;
 }
 
 
Index: libs/libmythtv/tv_rec.cpp
===================================================================
--- libs/libmythtv/tv_rec.cpp	(revision 20794)
+++ libs/libmythtv/tv_rec.cpp	(working copy)
@@ -1086,13 +1086,13 @@
 {
     pauseNotify = false;
     ispip = false;
-    int recHeight;
+    int recWidth;
 
     if (recorder && HasFlags(kFlagRecorderRunning))
     {
-        // Get the height and set the videoprops
-        recHeight = curRecording->GetHeight(); 
-        curRecording->SetVidpropHeight(recHeight);
+        // Get the width and set the videoprops
+        recWidth = curRecording->GetWidth();
+        curRecording->SetVidpropHeight(recWidth);
 
         int secsSince = curRecording->recstartts
             .secsTo(QDateTime::currentDateTime());
