weather-setup: change g_settings.weather_api_version to 3.0

Origin commit data
------------------
Commit: c902f2aac8
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-09-22 (Sun, 22 Sep 2024)

Origin message was:
------------------
- weather-setup: change g_settings.weather_api_version to 3.0

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2024-09-22 17:39:52 +02:00
committed by Thilo Graf
parent 96691b4e0d
commit 1ed6a667bc
3 changed files with 8 additions and 4 deletions

View File

@@ -39,8 +39,8 @@
CMenuOptionChooser::keyval_ext WEATHER_API_OPTIONS[] = CMenuOptionChooser::keyval_ext WEATHER_API_OPTIONS[] =
{ {
{ 0, NONEXISTANT_LOCALE, "2.5" }, { 0, NONEXISTANT_LOCALE, "3.0" },
{ 1, NONEXISTANT_LOCALE, "3.0" } { 1, NONEXISTANT_LOCALE, "?.?" } // prepared for next API version
}; };
#define WEATHER_API_OPTION_COUNT (sizeof(WEATHER_API_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext)) #define WEATHER_API_OPTION_COUNT (sizeof(WEATHER_API_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext))

View File

@@ -1116,7 +1116,7 @@ int CNeutrinoApp::loadSetup(const char *fname)
g_settings.weather_api_version = WEATHER_API_VERSION; g_settings.weather_api_version = WEATHER_API_VERSION;
#if ENABLE_WEATHER_KEY_MANAGE #if ENABLE_WEATHER_KEY_MANAGE
g_settings.weather_api_key = configfile.getString("weather_api_key", g_settings.weather_api_key.empty() ? "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" : g_settings.weather_api_key); g_settings.weather_api_key = configfile.getString("weather_api_key", g_settings.weather_api_key.empty() ? "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" : g_settings.weather_api_key);
g_settings.weather_api_version = configfile.getString("weather_api_version", g_settings.weather_api_version.empty() ? "2.5" : g_settings.weather_api_version); g_settings.weather_api_version = configfile.getString("weather_api_version", g_settings.weather_api_version.empty() ? "3.0" : g_settings.weather_api_version);
#endif #endif
g_settings.weather_enabled = configfile.getInt32("weather_enabled", 1); g_settings.weather_enabled = configfile.getInt32("weather_enabled", 1);
g_settings.weather_enabled = g_settings.weather_enabled && CApiKey::check_weather_api_key(); g_settings.weather_enabled = g_settings.weather_enabled && CApiKey::check_weather_api_key();
@@ -1501,6 +1501,10 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
g_settings.youtube_api_key = configfile.getString("youtube_dev_id", g_settings.youtube_api_key); g_settings.youtube_api_key = configfile.getString("youtube_dev_id", g_settings.youtube_api_key);
configfile.deleteKey("youtube_dev_id"); configfile.deleteKey("youtube_dev_id");
} }
if (g_settings.version_pseudo < "20240922210000")
{
g_settings.weather_api_version = "3.0";
}
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO; g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
configfile.setString("version_pseudo", g_settings.version_pseudo); configfile.setString("version_pseudo", g_settings.version_pseudo);

View File

@@ -1 +1 @@
#define NEUTRINO_VERSION_PSEUDO "20240405210000" #define NEUTRINO_VERSION_PSEUDO "20240922210000"