Index: mythtv/programs/mythbackend/httpstatus.cpp
===================================================================
--- mythtv.orig/programs/mythbackend/httpstatus.cpp	2009-05-29 17:37:28.000000000 -0400
+++ mythtv/programs/mythbackend/httpstatus.cpp	2009-05-29 17:43:27.000000000 -0400
@@ -366,7 +366,34 @@
         group.setAttribute("dir"  , directory );
 
         if (fsID == "total")
+        {
+            long long iLiveTV = -1, iDeleted = -1, iExpirable = -1;
+            MSqlQuery query(MSqlQuery::InitCon());
+            query.prepare("SELECT SUM(filesize) FROM recorded "
+                          " WHERE recgroup = :RECGROUP;");
+
+            query.bindValue("RECGROUP", "LiveTV");
+            if (query.exec() && (query.size() > 0) && query.next())
+            {
+                iLiveTV = query.value(0).toLongLong();
+            }
+            query.bindValue("RECGROUP", "Deleted");
+            if (query.exec() && (query.size() > 0) && query.next())
+            {
+                iDeleted = query.value(0).toLongLong();
+            }
+            query.prepare("SELECT SUM(filesize) FROM recorded "
+                          " WHERE autoexpire = 1 "
+                          "   AND recgroup NOT IN ('LiveTV', 'Deleted');");
+            if (query.exec() && (query.size() > 0) && query.next())
+            {
+                iExpirable = query.value(0).toLongLong();
+            }
+            group.setAttribute("livetv", (int)(iLiveTV>>20) );
+            group.setAttribute("deleted", (int)(iDeleted>>20) );
+            group.setAttribute("expirable", (int)(iExpirable>>20) );
             total = group;
+        }
         else
             fsXML << group;
     }
@@ -1127,6 +1154,9 @@
                 int nFree    = g.attribute("free" , "0" ).toInt();
                 int nTotal   = g.attribute("total", "0" ).toInt();
                 int nUsed    = g.attribute("used" , "0" ).toInt();
+                int nLiveTV    = g.attribute("livetv" , "0" ).toInt();
+                int nDeleted   = g.attribute("deleted", "0" ).toInt();
+                int nExpirable = g.attribute("expirable" , "0" ).toInt();
                 QString nDir = g.attribute("dir"  , "" );
 
                 nDir.replace(QRegExp(","), ", ");
@@ -1150,6 +1180,28 @@
                 sRep = c.toString(nFree) + " MB";
                 os << sRep << "</li>\r\n";
 
+                if ((nLiveTV + nDeleted + nExpirable) > 0)
+                {
+                    os << "            <li>Space Available "
+                          "After Auto-expire: ";
+                    sRep = c.toString(nFree + nLiveTV +
+                                      nDeleted + nExpirable) + " MB";
+                    os << sRep << "</li>\r\n";
+                    os << "            <ul>\r\n";
+                    os << "              <li>Space Used by LiveTV: ";
+                    sRep = c.toString(nLiveTV) + " MB";
+                    os << sRep << "</li>\r\n";
+                    os << "              <li>Space Used by "
+                          "Deleted Recordings: ";
+                    sRep = c.toString(nDeleted) + " MB";
+                    os << sRep << "</li>\r\n";
+                    os << "              <li>Space Used by "
+                          "Auto-expirable Recordings: ";
+                    sRep = c.toString(nExpirable) + " MB";
+                    os << sRep << "</li>\r\n";
+                    os << "            </ul>\r\n";
+                }
+
                 os << "          </ul>\r\n"
                 << "        </li>\r\n";
 

