mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- lcd4l/weather: fix creation of data files for first run
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -78,10 +78,10 @@ void CWeather::setCoords(std::string new_coords, std::string new_city)
|
||||
}
|
||||
}
|
||||
|
||||
bool CWeather::checkUpdate()
|
||||
bool CWeather::checkUpdate(bool forceUpdate)
|
||||
{
|
||||
time_t current_time = time(NULL);
|
||||
if (difftime(current_time,last_time) > MINUTES)
|
||||
if (forceUpdate || (difftime(current_time,last_time) > MINUTES))
|
||||
return GetWeatherDetails();
|
||||
else
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user