summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Morgan <smorgan@mythtv.org>2010-11-25 00:07:25 (GMT)
committer Stuart Morgan <smorgan@mythtv.org>2010-11-25 00:07:25 (GMT)
commitbd8784829b440cc2e758226c5db2c25233b21763 (patch)
tree54a88e48e6c715afc9542e33408533e3ce4911ec
parent1f5c281f21dc4695b149a3162750ebce41c1ac9c (diff)
Deal with an optional 's' in the BBC weather grabber when parsing strings like 'light snow shower(s)', fixes the icon for those of us facing snow this week.
git-svn-id: http://svn.mythtv.org/svn/trunk@27337 7dbf422c-18fa-0310-86e9-fd20926502f2
-rwxr-xr-xmythplugins/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl4
-rwxr-xr-xmythplugins/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl4
2 files changed, 4 insertions, 4 deletions
diff --git a/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl b/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl
index 84bc7e5..45fd8c5 100755
--- a/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl
+++ b/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbccurrentxml.pl
@@ -154,14 +154,14 @@ elsif ($weather_string =~ /^heavy rain$/i ||
}
elsif ($weather_string =~ /^thundery rain$/i ||
$weather_string =~ /^thunder storm$/i ||
- $weather_string =~ /^thundery showers$/i) {
+ $weather_string =~ /^thundery showers?$/i) {
printf "weather_icon::thunshowers.png\n";
}
elsif ($weather_string =~ /^heavy snow$/i) {
printf "weather_icon::snowshow.png\n";
}
elsif ($weather_string =~ /^light snow$/i ||
- $weather_string =~ /^light snow showers$/i) {
+ $weather_string =~ /^light snow showers?$/i) {
printf "weather_icon::flurries.png\n";
}
elsif ($weather_string =~ /^sleet$/i ||
diff --git a/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl b/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl
index 8c99c4e..1998c00 100755
--- a/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl
+++ b/mythplugins/mythweather/mythweather/scripts/uk_bbc/bbcthreedayxml.pl
@@ -179,14 +179,14 @@ foreach $item (@{$xml->{channel}->{item}}) {
}
elsif ($weather_string =~ /^thundery rain$/i ||
$weather_string =~ /^thunder storm$/i ||
- $weather_string =~ /^thundery showers$/i) {
+ $weather_string =~ /^thundery showers?$/i) {
printf "icon-" . $i . "::thunshowers.png\n";
}
elsif ($weather_string =~ /^heavy snow$/i) {
printf "icon-" . $i . "::snowshow.png\n";
}
elsif ($weather_string =~ /^light snow$/i ||
- $weather_string =~ /^light snow showers$/i) {
+ $weather_string =~ /^light snow showers?$/i) {
printf "icon-" . $i . "::flurries.png\n";
}
elsif ($weather_string =~ /^sleet$/i ||