Binary files ../mythplugins-orig/mythweather/mythweather/libmythweather.so and ./mythweather/mythweather/libmythweather.so differ
Binary files ../mythplugins-orig/mythweather/mythweather/main.o and ./mythweather/mythweather/main.o differ
diff -rup ../mythplugins-orig/mythweather/mythweather/Makefile ./mythweather/mythweather/Makefile
--- ../mythplugins-orig/mythweather/mythweather/Makefile	2007-04-14 01:32:02.000000000 -0400
+++ ./mythweather/mythweather/Makefile	2007-04-21 00:54:14.000000000 -0400
@@ -187,6 +187,56 @@ install_installimages: all 
 	-$(INSTALL_FILE) "images/sunny.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
 	-$(INSTALL_FILE) "images/thunshowers.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
 	-$(INSTALL_FILE) "images/unknown.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/0.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/1.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/2.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/3.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/4.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/5.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/6.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/7.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/8.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/9.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/10.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/11.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/12.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/13.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/14.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/15.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/16.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/17.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/18.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/19.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/20.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/21.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/22.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/23.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/24.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/25.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/26.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/27.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/28.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/29.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/30.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/31.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/32.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/33.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/34.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/35.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/36.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/37.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/38.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/39.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/40.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/41.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/42.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/43.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/44.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/45.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/46.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/na.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+	-$(INSTALL_FILE) "images/weather_logo.png" "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
+
 
 
 uninstall_installimages: 
@@ -210,6 +260,55 @@ uninstall_installimages: 
 	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/sunny.png"
 	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/thunshowers.png"
 	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/unknown.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/0.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/1.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/2.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/3.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/4.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/5.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/6.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/7.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/8.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/9.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/10.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/11.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/12.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/13.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/14.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/15.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/16.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/17.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/18.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/19.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/20.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/21.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/22.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/23.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/24.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/25.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/26.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/27.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/28.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/29.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/30.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/31.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/32.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/33.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/34.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/35.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/36.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/37.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/38.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/39.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/40.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/41.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/42.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/43.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/44.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/45.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/46.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/na.png"
+	-$(DEL_FILE) -r "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/weather_logo.png"
 	-$(DEL_DIR) "$(INSTALL_ROOT)/usr/share/mythtv/themes/default/"
 
diff -rup ../mythplugins-orig/mythweather/mythweather/weather.cpp ./mythweather/mythweather/weather.cpp
--- ../mythplugins-orig/mythweather/mythweather/weather.cpp	2007-03-26 23:20:23.000000000 -0400
+++ ./mythweather/mythweather/weather.cpp	2007-04-21 00:46:40.000000000 -0400
@@ -1549,13 +1549,13 @@ void Weather::cursorRight()
 
         if (tp == 6)
              tp = 1;
-
+/*
         if (tp == 3 && pastTime == true)
                 tp = 4;
 
         if (tp == 4 && pastTime == false)
                 tp = 5;
-
+*/
         showLayout(tp);
    }
    else if (deepSetup == false)
@@ -1659,13 +1659,13 @@ void Weather::cursorLeft()
         
         if (tp == 0)
              tp = 5;
-
+/*
         if (tp == 3 && pastTime == true)
                 tp = 2;
 
         if (tp == 4 && pastTime == false)
                 tp = 3;
-
+*/
         showLayout(tp);
    }
    else if (deepSetup == true)
@@ -1736,12 +1736,12 @@ void Weather::nextpage_timeout()
    tp++;
    if (tp > 5) 
         tp = 1;
-
+/*
    if (tp == 3 && pastTime == true)
         tp = 4;
    if (tp == 4 && pastTime == false)
         tp = 5;
-
+*/
    showLayout(tp);
 
 }
@@ -1783,12 +1783,12 @@ void Weather::update_timeout()
 
     if (result == true)
     {
-
+/*
     if (pastTime == true && currentPage == 3 && inSetup == false)
         nextpage_timeout();
     if (pastTime == false && currentPage == 4 && inSetup == false)
         nextpage_timeout();
-
+*/
     if (firstRun == true && inSetup == false)
         nextpage_Timer->start((int)(1000 * nextpageInterval));
 
@@ -1891,7 +1891,11 @@ void Weather::update_timeout()
 
     QString todayDesc;
 
-    todayDesc = tr("Today a high of ") + highTemp[0] + tr(" and a low of ");
+    if (highTemp[0] != "N/A")
+        todayDesc = tr("Today expect a high of ") + highTemp[0] + tr(" and a low of ");
+    else
+        todayDesc = tr("Today expect a low of ");
+
     todayDesc += lowTemp[0] + tr(". Currently there is a humidity of ");
     todayDesc += curHumid + tr("% and the winds are");
 
@@ -1905,7 +1909,7 @@ void Weather::update_timeout()
                 todayDesc += tr(" coming in at ") + curWind + tr(" Km/h from the ") + tr(winddir) + ".";
     }
   
-    if (visibility.toFloat() == 999.00)
+    if (visibility == "Unlimited")
         todayDesc += tr(" Visibility will be unlimited for today.");
     else
     {
@@ -1926,27 +1930,37 @@ void Weather::update_timeout()
     QString tomDesc;
  
     QString tomDate;
-    if (date[0].upper() == "SUN")
+/*
+    if (date[1].upper() == "SUN")
         tomDate = tr("Sunday");
-    else if (date[0].upper() == "MON")
+    else if (date[1].upper() == "MON")
         tomDate = tr("Monday");
-    else if (date[0].upper() == "TUE")
+    else if (date[1].upper() == "TUE")
         tomDate = tr("Tuesday");
-    else if (date[0].upper() == "WED")
+    else if (date[1].upper() == "WED")
         tomDate = tr("Wednesday");
-    else if (date[0].upper() == "THU")
+    else if (date[1].upper() == "THU")
         tomDate = tr("Thursday");
-    else if (date[0].upper() == "FRI")
+    else if (date[1].upper() == "FRI")
         tomDate = tr("Friday");
-    else if (date[0].upper() == "SAT")
+    else if (date[1].upper() == "SAT")
         tomDate = tr("Saturday");
     else
         tomDate = tr("Date Error");
+*/
 
-    tomDesc = tr("Tomorrow expect a high of ") + highTemp[0] + tr(" and a low of ");
-    tomDesc += lowTemp[0] + tr(".");
+    tomDate = tr(" ") + date[1];
+    tomDesc = tr("Expect high of ") + highTemp[1] + tr(", low of ");
+    tomDesc += lowTemp[1] + tr(" and humidity ") + humid[1];
+//    tomDesc += tr("%. The prob of precip is ") + precip[1];
+    tomDesc += tr("%. Winds ") + wind[1];
+    if (convertData == false)
+      tomDesc += tr(" mph ") + tr(wdir[1]) + ".";
+    else 
+      tomDesc += tr(" Km/h ") + tr(wdir[1]) + ".";
 
-    QString tomCond = tr("Expected conditions: ") + weatherType[0];
+    QString tomCond = tr("Expected conditions: ") + weatherType[1];
+    tomCond += tr(" pp ") + precip[1] + tr("%");
  
     container = theme->GetSet("weatherpages");
     if (container)
@@ -1959,7 +1973,7 @@ void Weather::update_timeout()
         itype = (UIImageType *)container->GetType("todaypic");
         if (itype)
         {
-            itype->SetImage(weatherIcon[0]);
+            itype->SetImage(weatherIcon[1]);
             itype->LoadImage();
         }
  
@@ -1998,12 +2012,15 @@ void Weather::update_timeout()
         SetText(container, "low1", lowTemp[1]);
         SetText(container, "low2", lowTemp[2]);
         SetText(container, "low3", lowTemp[3]);
+        SetText(container, "precip1", precip[1]);
+        SetText(container, "precip2", precip[2]);
+        SetText(container, "precip3", precip[3]);
     }
 
     container = theme->GetSet("weatherpages");
     if (container)
     {
-         SetText(container, "updatetime", tr("Weather data from: ") + updated);
+         SetText(container, "updatetime", tr("Weather data last updated: ") + updated);
     }
 
     if (firstRun == true)
@@ -2127,15 +2144,29 @@ bool Weather::UpdateData()
 
     if (haveData == true)
     {
+        getCurrentConditions();
+
+	getForecast();
+    
+        return true;
+    }
+    
+    return false;
+}
 
-        //updated = GetString("this.swLastUp");
-        updated = QDateTime::currentDateTime().toString(gContext->GetSetting("dateformat") +
-                  " " + gContext->GetSetting("timeformat"));
-        city = GetString("this.swCity");
-        state = GetString("this.swSubDiv");
-        country = GetString("this.swCountry");
-        curTemp = GetString("this.swTemp");
-        if (curTemp.length() == 0)
+void Weather::getCurrentConditions()
+{
+	QString cc, wind, bar, uv;
+
+      //  updated = QDateTime::currentDateTime().toString(gContext->GetSetting("dateformat") +  " " + gContext->GetSetting("timeformat"));
+        city = GetString(httpData, "<dnam>", "</dnam>");
+  //      state = GetString("this.swSubDiv");
+  //      country = GetString("this.swCountry");
+        updated = GetString(httpData, "<lsup>", "</lsup>");
+        cc = GetString(httpData, "<cc>", "</cc>");
+        curTemp = GetString(cc, "<tmp>", "</tmp>");
+
+        if ( (curTemp.length() == 0) || (curTemp == "N/A") )
         {
             curTemp = "-na-";
             updated = updated + tr(" (Not All Information Available)");
@@ -2152,20 +2183,25 @@ bool Weather::UpdateData()
             }
         }
     
-        curIcon = GetString("this.swCIcon");
-        curWind = GetString("this.swWindS");
+        curIcon = "weather/" + GetString(cc, "<icon>", "</icon>") + ".png";
+		
+	wind = GetString(cc, "<wind>", "</wind>");
+	bar  = GetString(cc, "<bar>", "</bar>");
+	uv   = GetString(cc, "<uv>", "</uv>");
+
+        curWind = GetString(wind, "<s>", "</s>");
         if (convertData == true)
         {
-            char tempHold[32];
-            double tTemp = curWind.toDouble();
-            double nTemp = (double)(tTemp*1.6);
-            sprintf (tempHold, "%d", (int)nTemp);
-            curWind = tempHold;
+            char windHold[32];
+            double tWind = curWind.toDouble();
+            double nWind = (double)(tWind*1.6);
+            sprintf (windHold, "%d", (int)nWind);
+            curWind = windHold;
         }
     
-        winddir = GetString("this.swWindD");
+        winddir = GetString(wind, "<t>", "</t>");
     
-        barometer = GetString("this.swBaro");
+        barometer = GetString(bar, "<r>", "</r>");
         if (convertData == true)
         {
             char tempHold[32];
@@ -2175,8 +2211,8 @@ bool Weather::UpdateData()
             barometer = tempHold;
         }
         
-        curHumid = GetString("this.swHumid");
-        curFeel = GetString("this.swReal");
+        curHumid = GetString(cc, "<hmid>", "</hmid>");
+        curFeel = GetString(cc, "<flik>", "</flik>");
         if (convertData == true)
         {
             char tempHold[32];
@@ -2186,9 +2222,9 @@ bool Weather::UpdateData()
             curFeel = tempHold;
         }
         
-        uvIndex = GetString("this.swUV");
-        visibility = GetString("this.swVis");
-        if (convertData == true && visibility.toDouble() != 999.0)
+        uvIndex = GetString(uv, "<i>", "</i>");
+        visibility = GetString(cc, "<vis>", "</vis>");
+        if (convertData == true && visibility.toDouble() != 999.0 && visibility != "Unlimited")
         {
             char tempHold[32];
             double tTemp = visibility.toDouble();
@@ -2197,89 +2233,65 @@ bool Weather::UpdateData()
             visibility = tempHold;
         }
         
-        description = GetString("this.swConText");
+        description = GetString(cc, "<t>", "</t>");
         if (description.length() == 0)
-            description = curIcon;
+            description = "N/A";
+}
+
+void Weather::getForecast()
+{
+    	QString forecast, d, day, start_tag, wd;
+        char str[24];
         
-        QString forecastData;
-        forecastData = GetString("this.swFore");
-    
-        QStringList holdings = QStringList::split("|", forecastData);
-    
-        int years, mons, days;
-    
-        int dayNum = (holdings[0]).toInt();
-        QDate curDay(QDate::currentDate());
-        int curDayNum = curDay.dayOfWeek();
-        if (curDayNum == 7)
-            curDayNum = 1;
-        else
-            curDayNum++;
-    
-        if (curDayNum != dayNum)
-            pastTime = true;
-        else
-            pastTime = false;
-    
-        for (int i = 5; i < 9; i++)
-        {
-            QStringList dates = QStringList::split("/", holdings[i]);
-            years = dates[2].toInt();
-            mons = dates[0].toInt();
-            days = dates[1].toInt();
-            QDate doDate(years, mons, days);
-            switch (doDate.dayOfWeek())
-            {
-                case 1: date[i - 5] = QString("MON"); break;
-                case 2: date[i - 5] = QString("TUE"); break;
-                case 3: date[i - 5] = QString("WED"); break;
-                case 4: date[i - 5] = QString("THU"); break;
-                case 5: date[i - 5] = QString("FRI"); break;
-                case 6: date[i - 5] = QString("SAT"); break;
-                case 7: date[i - 5] = QString("SUN"); break;
-            }
-        }
-    
-        for (int i = 9; i < 13; i++)
-            weatherIcon[i - 9] = holdings[i];
-    
-        for (int i = 20; i < 24; i++)
+	pastTime = true;
+
+        for (int i = 0; i < 5; i++)
         {
-            if (convertData == true)
+            sprintf(str, "<day d=\"%i\"", i);
+            start_tag = QString(str);
+            forecast = GetString(httpData, start_tag, "</day>");
+	    highTemp[i] = GetString(forecast, "<hi>", "</hi>");
+	    lowTemp[i]  = GetString(forecast, "<low>", "</low>");
+
+	    d = GetString(forecast, "<part p=\"d\">", "</part>");
+            wd = GetString(d, "<wind>", "</wind>");
+
+	    precip[i] = GetString(d, "<ppcp>", "</ppcp>");
+	    humid[i] = GetString(d, "<hmid>", "</hmid>");
+            wind[i]  = GetString(wd, "<d>", "</d>");
+            wdir[i]  = GetString(wd, "<t>", "</t>");
+	    weatherIcon[i] = "weather/" + GetString(d, "<icon>", "</icon>") + ".png";
+
+	    weatherType[i] = GetString(d, "<t>", "</t>"); 
+      	    date[i] = GetString(forecast, "t=\"", "\" dt=");
+ 
+            if ( (convertData == true) && (highTemp[i] != "N/A") )
             {
                 char tempHold[32];
-                double tTemp = holdings[i].toDouble();
+                double tTemp = highTemp[i].toDouble();
                 double nTemp = (double)(5.0/9.0)*(tTemp - 32.0);
                 sprintf (tempHold, "%d", (int)nTemp);
-                holdings[i] = tempHold;
+                highTemp[i] = tempHold;
             }
-            highTemp[i - 20] = holdings[i];
-        }
-    
-        for (int i = 40; i < 44; i++)
-        {
-            if (convertData == true)
+            
+            if ( (convertData == true) && (lowTemp[i] != "N/A") )
             {
                 char tempHold[32];
-                double tTemp = holdings[i].toDouble();
+                double tTemp = lowTemp[i].toDouble();
                 double nTemp = (double)(5.0/9.0)*(tTemp - 32.0);
                 sprintf (tempHold, "%d", (int)nTemp);
-                holdings[i] = tempHold;
+                lowTemp[i] = tempHold;
+            }
+           if (convertData == true)
+            {
+               char windHold[32];
+               double tWind = wind[i].toDouble();
+               double nWind = (double)(tWind*1.6);
+               sprintf (windHold, "%d", (int)nWind);
+               wind[i] = windHold;
             }
-            lowTemp[i - 40] = holdings[i];
+             
         }
-    
-        for (int i = 15; i < 19; i++)
-            weatherType[i - 15] = holdings[i];
-    
-        setWeatherTypeIcon(weatherType);
-        setWeatherIcon(description);
-    
-        return true;
-
-    }
-    
-    return false;
 }
 
 void Weather::setWeatherTypeIcon(QString wt[5])
@@ -2334,44 +2346,41 @@ void Weather::setWeatherIcon(QString txt
     curIcon = "weather/unknown.png";
 }
 
-QString Weather::GetString(QString tag)
+
+QString Weather::GetString(QString data, QString tag_begin, QString tag_end)
 {
-    QString data;
+    QString str;
     int start = 0;
+    int end = 0;
     int len = 0;
     
-    start = httpData.find(tag, 0);
-    len = httpData.find("\"", start + tag.length() + 4) - start - tag.length() - 4;
+    start = data.find(tag_begin, 0) + tag_begin.length();
+    end   = data.find(tag_end, start);
+    len   = end - start;
     
-    data = httpData.mid(start + tag.length() + 4, len);
+    str = data.mid(start, len);
 
-    return data;
+    return str;
 }
 
-int Weather::GetInt(QString tag)
+int Weather::GetInt(QString data, QString tag_start, QString tag_end)
 {
-    QString data;
-    int start = 0;
-    int len = 0;
-    
-    start = httpData.find(tag, 0);
-    len = httpData.find("\"", start + tag.length() + 4) - start - tag.length() - 4;
-    data = httpData.mid(start + tag.length() + 4, len);
-    int ret = data.toInt();
+    QString str;
+
+    str = GetString(data, tag_start, tag_end);
+
+    int ret = str.toInt();
 
     return ret;
 }
 
-float Weather::GetFloat(QString tag)
+float Weather::GetFloat(QString data, QString tag_start, QString tag_end)
 {
-    QString data;
-    int start = 0;
-    int len = 0;
+    QString str;
 
-    start = httpData.find(tag, 0);
-    len = httpData.find("\"", start + tag.length() + 4) - start - tag.length() - 4;
-    data = httpData.mid(start + tag.length() + 4, len);
-    float ret = data.toFloat();
+    str = GetString(data, tag_start, tag_end);
+
+    float ret = str.toFloat();
 
     return ret;
 }
@@ -2379,7 +2388,14 @@ float Weather::GetFloat(QString tag)
 bool Weather::GetWeatherData()
 {
 
-    QString weatherDataURL = "http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=" + locale;
+    QString weatherDataURL = "http://xoap.weather.com/weather/local/" + locale + "?cc=*&unit=f&dayf=5";
+
+//
+// Technically we should include the partner id and key
+// if this stops working, change to the following:
+// http://xoap.weather.com/weather/local/".$this->acid."?cc=*&unit=F&dayf=5&prod=xoap&par=1036905921&key=f68c2657a4fd3e2e"
+// may need to get a new one from http://www.weather.com/services/xmloap.html
+//
 
     VERBOSE(VB_NETWORK, QString("Grabbing weather from: %1").arg(weatherDataURL));
 
@@ -2390,8 +2406,8 @@ bool Weather::GetWeatherData()
 
     httpData = HttpComms::getHttp(weatherDataURL, weatherTimeoutInt, 3, 3);
 
-    if (httpData.find("this.swAcid = \"\";") != -1 ||
-        httpData.find("<html>") != -1 ||
+    if (httpData.find("<loc id=") == -1 ||
+        httpData.find("<?xml") == -1 ||
         httpData.find("Microsoft VBScript runtime") != -1 ||
         httpData.find("Internal Server Error") != -1  ||
         httpData.find("Bad Request", 0) != -1)
diff -rup ../mythplugins-orig/mythweather/mythweather/weather.h ./mythweather/mythweather/weather.h
--- ../mythplugins-orig/mythweather/mythweather/weather.h	2007-03-26 23:20:23.000000000 -0400
+++ ./mythweather/mythweather/weather.h	2007-04-21 00:01:45.000000000 -0400
@@ -135,6 +135,8 @@ class Weather : public MythDialog
     void updateLetters();
     void loadAccidBreaks();
     bool GetWeatherData();
+    void getCurrentConditions();
+    void getForecast();
     bool GetAnimatedRadarMap();
     bool GetStaticRadarMap();
     bool gotDataHook;
@@ -145,9 +147,9 @@ class Weather : public MythDialog
     void showCityName();
     void setSetting(QString, QString, bool);
 
-    QString GetString(QString);
-    int GetInt(QString);
-    float GetFloat(QString);
+    QString GetString(QString, QString, QString);
+    int GetInt(QString, QString, QString);
+    float GetFloat(QString, QString, QString);
 
     void loadWeatherTypes();
     weatherTypes *wData;
@@ -179,6 +181,9 @@ class Weather : public MythDialog
     QString highTemp[5];
     QString lowTemp[5];
     QString precip[5];
+    QString humid[5];
+    QString wind[5];
+    QString wdir[5];
 
     QString httpData;
     QString oldhttpData;
