mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
neutrino: add upgradeSetup function ...
... to upgrade neutrino.conf to new defaults if needed
Origin commit data
------------------
Branch: ni/coolstream
Commit: 66258704bf
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-03-03 (Thu, 03 Mar 2016)
Origin message was:
------------------
- neutrino: add upgradeSetup function ...
... to upgrade neutrino.conf to new defaults if needed
------------------
This commit was generated by Migit
This commit is contained in:
committed by
Michael Liebmann
parent
ed757e69fe
commit
0ceff9e442
@@ -912,11 +912,32 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
|
|
||||||
g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000");
|
g_settings.version_pseudo = configfile.getString("version_pseudo", "19700101000000");
|
||||||
|
|
||||||
|
if (g_settings.version_pseudo < NEUTRINO_VERSION_PSEUDO)
|
||||||
|
upgradeSetup(fname);
|
||||||
|
|
||||||
if(erg)
|
if(erg)
|
||||||
configfile.setModifiedFlag(true);
|
configfile.setModifiedFlag(true);
|
||||||
return erg;
|
return erg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CNeutrinoApp::upgradeSetup(const char * fname)
|
||||||
|
{
|
||||||
|
if (g_settings.version_pseudo < "20160226110000")
|
||||||
|
{
|
||||||
|
if (g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items == "7")
|
||||||
|
{
|
||||||
|
g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items = "7,31";
|
||||||
|
configfile.setString("usermenu_tv_yellow", g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
|
||||||
|
configfile.setString("version_pseudo", g_settings.version_pseudo);
|
||||||
|
|
||||||
|
if (configfile.getModifiedFlag())
|
||||||
|
configfile.saveConfig(fname);
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************************************
|
/**************************************************************************************
|
||||||
* CNeutrinoApp - saveSetup, save the application-settings *
|
* CNeutrinoApp - saveSetup, save the application-settings *
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
@@ -162,6 +162,7 @@ public:
|
|||||||
|
|
||||||
void saveSetup(const char * fname);
|
void saveSetup(const char * fname);
|
||||||
int loadSetup(const char * fname);
|
int loadSetup(const char * fname);
|
||||||
|
void upgradeSetup(const char * fname);
|
||||||
void loadKeys(const char * fname = NULL);
|
void loadKeys(const char * fname = NULL);
|
||||||
void saveKeys(const char * fname = NULL);
|
void saveKeys(const char * fname = NULL);
|
||||||
void SetupTiming();
|
void SetupTiming();
|
||||||
|
@@ -1 +1 @@
|
|||||||
#define NEUTRINO_VERSION_PSEUDO "19700101000000"
|
#define NEUTRINO_VERSION_PSEUDO "20160226110000"
|
||||||
|
Reference in New Issue
Block a user