--- /home/halex/filldata.cpp	2006-09-05 21:10:36.000000000 +1000
+++ ./filldata.cpp	2006-09-05 17:28:22.000000000 +1000
@@ -1464,6 +1464,26 @@
             {
                 parseCredits(info, pginfo);
             }
+	    else if (info.tagName() == "subtitles" && info.attribute("type") == "teletext")
+	    {
+		pginfo->closecaptioned = true;
+	    }
+	    else if (info.tagName() == "video")
+	    {
+		// Just a simply <video> hack to get HDTV in XMLTV working
+		//
+		// This is a lazy copy and paste implementation, probably
+		// requires work to clean up and optimize, but it works, and
+		// that's the main thing :)
+		QDomNodeList values = info.elementsByTagName("quality");
+                QDomElement item;
+                for (unsigned int i = 0; i < values.length(); i++)
+                {
+                    item = values.item(i).toElement();
+                    if (item.isNull())
+                        continue;
+		     pginfo->hdtv = true;
+		}
+	    }
             else if (info.tagName() == "episode-num" &&
                      info.attribute("system") == "xmltv_ns")
             {
@@ -1505,7 +1525,7 @@
                 }
             }
             else if (info.tagName() == "episode-num" &&
-                     info.attribute("system") == "onscreen" &&
+                     info.attribute("type") == "onscreen" &&
                      pginfo->subtitle.isEmpty())
             {
                  pginfo->catType = "series";
