Permalink
Browse files

Deal with an optional 's' in the BBC weather grabber when parsing str…

…ings 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
  • Loading branch information...
1 parent 1f5c281 commit bd8784829b440cc2e758226c5db2c25233b21763 @stuartm stuartm committed Nov 25, 2010
@@ -154,14 +154,14 @@
}
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 ||
@@ -179,14 +179,14 @@
}
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 ||

0 comments on commit bd87848

Please sign in to comment.