mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-19 07:23:05 +03:00
Weather updates
This commit is contained in:
parent
b6bc22ae63
commit
3c47375229
@@ -53,12 +53,18 @@ namespace MediaBrowser.Controller.Weather
|
||||
{
|
||||
WeatherInfo info = new WeatherInfo();
|
||||
|
||||
if (data.current_condition.Any())
|
||||
if (data.current_condition != null)
|
||||
{
|
||||
info.CurrentWeather = data.current_condition.First().ToWeatherStatus();
|
||||
if (data.current_condition.Any())
|
||||
{
|
||||
info.CurrentWeather = data.current_condition.First().ToWeatherStatus();
|
||||
}
|
||||
}
|
||||
|
||||
info.Forecasts = data.weather.Select(w => w.ToWeatherForecast()).ToArray();
|
||||
if (data.weather != null)
|
||||
{
|
||||
info.Forecasts = data.weather.Select(w => w.ToWeatherForecast()).ToArray();
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user