Преглед изворни кода

Minor updates to plugin downloading and weather

LukePulverenti Luke Pulverenti luke pulverenti пре 12 година
родитељ
комит
6da0ec4170
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      MediaBrowser.Controller/Weather/WeatherClient.cs

+ 5 - 0
MediaBrowser.Controller/Weather/WeatherClient.cs

@@ -31,6 +31,11 @@ namespace MediaBrowser.Controller.Weather
 
 
         public async Task<WeatherInfo> GetWeatherInfoAsync(string zipCode)
         public async Task<WeatherInfo> GetWeatherInfoAsync(string zipCode)
         {
         {
+            if (string.IsNullOrWhiteSpace(zipCode))
+            {
+                return null;
+            }
+
             int numDays = 5;
             int numDays = 5;
             string apiKey = "24902f60f1231941120109";
             string apiKey = "24902f60f1231941120109";