[mythtv-users] MythWeather Animated Maps Cannot Download?

Maverick mavantix at gmail.com
Sun Mar 13 13:17:15 UTC 2005


It would appear w3.weather.com is hard coded in weather.cpp
(MythWeather module). I'm assuming weather.com has changed their
servers and/or dns entires around. I just changed the w3's to www's
and recompiled MythWeather. Also fixed weather.php in Mythweb.

Here's the diffs against 0.17:

$ diff weather.cpp.orig weather.cpp
2486c2486
<     QUrl weatherMapLink1URL(QString("http://w3.weather.com/weather/map/%1"
---
>     QUrl weatherMapLink1URL(QString("http://www.weather.com/weather/map/%1"
2488c2488
<                                     "Connection: close\nHost:
w3.weather.com\n\n\n")
---
>                                     "Connection: close\nHost: www.weather.com\n\n\n")
2510c2510
<     QUrl weatherMapLink2URL("http://w3.weather.com/" + mapLoc);
---
>     QUrl weatherMapLink2URL("http://www.weather.com/" + mapLoc);
2592c2592
<      QString sURL = "http://w3.weather.com/weather/map/" + locale +
---
>      QString sURL = "http://www.weather.com/weather/map/" + locale +
2605c2605
<      mapLoc = "http://w3.weather.com/" + mapLoc;
---
>      mapLoc = "http://www.weather.com/" + mapLoc;


and for weather.php (MythWeb):

$ diff weather.php.orig weather.php
193c193
<       $data = file("http://w3.weather.com/weather/map/" .
$this->acid . "?from=LAPmaps&setcookie=1");
---
>       $data = file("http://www.weather.com/weather/map/" . $this->acid . "?from=LAPmaps&setcookie=1");
198c198
<           $url1 = "http://w3.weather.com/" . substr($url1, 0,
strlen($url1) - 2);
---
>           $url1 = "http://www.weather.com/" . substr($url1, 0, strlen($url1) - 2);

Lastly, on my KnoppMyth R5A12 install, I had to move the .so after
make install put it in the wrong place, and fix perms:

# mv /usr/local/lib/mythtv/plugins/libmythweather.so
/usr/lib/mythtv/plugins/libmythweather.so
# chmod 644 /usr/lib/mythtv/plugins/libmythweather.so

I also had to reboot to get it to work, I guess mythtv preloads the modules...

One last problem, as it cycles through the animated images, there's a
"Map Unavailable" displayed between the cycles. Maybe that is because
there's less images than expected for the "frames" of map motion. I
don't know how to fix that. Maybe not a problem either, not sure.

Anyone out there that can submit this to CVS (if it's not allready there)?

-Kenneth


On Sun, 13 Mar 2005 21:37:11 +1100, Phill Edwards
<philledwards at gmail.com> wrote:
> > MythWeather gets an error trying to get the maps...
> >
> > And weather.php in MythWeb gets:
> >
> > Warning at /usr/share/mythtv/mythweb/weather.php, line 193:
> > file(): php_network_getaddresses: getaddrinfo failed: Name or service
> > not known Warning at /usr/share/mythtv/mythweb/weather.php, line 193:
> > file(http://w3.weather.com/weather/map/USVA0808?from=LAPmaps&setcookie=1):
> > failed to open stream: Success Warning at
> > /usr/share/mythtv/mythweb/weather.php, line 194:
> > Invalid argument supplied for foreach() Warning at
> > /usr/share/mythtv/mythweb/weather.php, line 204:
> > Invalid argument supplied for foreach() Warning at
> > /usr/share/mythtv/mythweb/themes/Default/theme.php, line 16:
> > Cannot modify header information - headers already sent by (output
> > started at /usr/share/mythtv/mythweb/includes/errors.php:68)
> >
> > It appears w3 is no longer a valid subdomain for weather.com, anyone
> > else have this problem?
> >
> > Can I just change the w3 to www or w2 in the settings table?
> 
> Yes, I also get this in mythweb. If you find a fix could you please post it?
> 
> Thanks,
> Phill
>


More information about the mythtv-users mailing list