timeshift: unify config keywords and locales

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6755b49e20
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-01-15 (Tue, 15 Jan 2019)

Origin message was:
------------------
- timeshift: unify config keywords and locales

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2019-01-15 23:39:10 +01:00
parent d64960d7de
commit 9ec8edc7ea
10 changed files with 52 additions and 38 deletions

View File

@@ -695,9 +695,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.last_webradio_dir = configfile.getString( "last_webradio_dir", WEBRADIODIR_VAR);
g_settings.last_webtv_dir = configfile.getString( "last_webtv_dir", WEBTVDIR_VAR);
g_settings.temp_timeshift = configfile.getInt32( "temp_timeshift", 1 ); //NI
g_settings.auto_timeshift = configfile.getInt32( "auto_timeshift", 0 );
g_settings.auto_delete = configfile.getInt32( "auto_delete", 1 );
g_settings.timeshift_temp = configfile.getInt32( "timeshift_temp", 1 );
g_settings.timeshift_auto = configfile.getInt32( "timeshift_auto", 0 );
g_settings.timeshift_delete = configfile.getInt32( "timeshift_delete", 1 );
std::string timeshiftDir;
if(g_settings.timeshiftdir.empty()) {
@@ -715,7 +715,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
CRecordManager::getInstance()->SetTimeshiftDirectory(timeshiftDir.c_str());
// remove old timeshift recordings
if (g_settings.auto_delete)
if (g_settings.timeshift_delete)
{
/*
Why only remove old timeshift recordings
@@ -1316,6 +1316,16 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
if (g_settings.lcd4l_skin == 4)
g_settings.lcd4l_skin = 100;
}
if (g_settings.version_pseudo < "20190115220100")
{
// rename timeshift keys
g_settings.timeshift_auto = configfile.getInt32("auto_timeshift", 0);
configfile.deleteKey("auto_timeshift");
g_settings.timeshift_temp = configfile.getInt32("temp_timeshift", 1);
configfile.deleteKey("temp_timeshift");
g_settings.timeshift_delete = configfile.getInt32("auto_delete", 1);
configfile.deleteKey("auto_delete");
}
g_settings.version_pseudo = NEUTRINO_VERSION_PSEUDO;
configfile.setString("version_pseudo", g_settings.version_pseudo);
@@ -1659,11 +1669,13 @@ void CNeutrinoApp::saveSetup(const char * fname)
saveKeys();
configfile.setInt32( "timeshift_pause", g_settings.timeshift_pause );
configfile.setInt32( "temp_timeshift", g_settings.temp_timeshift );
configfile.setInt32( "auto_timeshift", g_settings.auto_timeshift );
configfile.setInt32( "auto_delete", g_settings.auto_delete );
configfile.setInt32( "timeshift_temp", g_settings.timeshift_temp );
configfile.setInt32( "timeshift_auto", g_settings.timeshift_auto );
configfile.setInt32( "timeshift_delete", g_settings.timeshift_delete );
configfile.setInt32( "record_hours", g_settings.record_hours );
configfile.setInt32( "timeshift_hours", g_settings.timeshift_hours );
//printf("set: key_unlock =============== %d\n", g_settings.key_unlock);
configfile.setInt32( "screenshot_count", g_settings.screenshot_count );
configfile.setInt32( "screenshot_format", g_settings.screenshot_format );