neutrino: cleanup upgradeSetup() from very old stuff

Origin commit data
------------------
Commit: 30c3c998f6
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-30 (Sun, 30 Jan 2022)

Origin message was:
------------------
- neutrino: cleanup upgradeSetup() from very old stuff
This commit is contained in:
vanhofen
2022-01-30 21:17:38 +01:00
parent 5699cd41ca
commit ffbcf0a6ce

View File

@@ -1348,12 +1348,6 @@ int CNeutrinoApp::loadSetup(const char *fname)
if (!erg)
{
// fix wrong entries
if (g_settings.version_pseudo == "20213103000000")
g_settings.version_pseudo = "20210331000000";
else if (g_settings.version_pseudo == "20212804200000")
g_settings.version_pseudo = "20210428200000";
if (g_settings.version_pseudo < NEUTRINO_VERSION_PSEUDO)
upgradeSetup(fname);
@@ -1424,160 +1418,6 @@ void CNeutrinoApp::upgradeSetup(const char * fname)
{
dprintf(DEBUG_NORMAL, "upgrade/cleanup %s\n", fname);
if (g_settings.version_pseudo < "20160226110000")
{
if (g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items == "7")
{
g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items = "7,35"; //NI
configfile.setString("usermenu_tv_yellow", g_settings.usermenu[SNeutrinoSettings::BUTTON_YELLOW]->items);
}
}
if (g_settings.version_pseudo < "20160804110000")
{
if (g_settings.tmdb_api_key == "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
g_settings.tmdb_api_key = "7270f1b571c4ecbb5b204ddb7f8939b1";
}
if (g_settings.version_pseudo < "20161411235900")
{
//convert and remove obsolete recording_tevents key
bool recording_tevents = configfile.getBool("recording_tevents", false);
if (recording_tevents)
g_settings.timer_followscreenings = 2 /*always*/;
configfile.deleteKey("recording_tevents");
}
if (g_settings.version_pseudo < "20162912080000")
{
//convert and remove obsolete progressbar_* keys
g_settings.theme.progressbar_design = configfile.getInt32("progressbar_design", CProgressBar::PB_MONO);
bool pb_color = configfile.getBool("progressbar_color", true );
if (!pb_color)
g_settings.theme.progressbar_design = CProgressBar::PB_MONO;
g_settings.theme.progressbar_design_channellist = configfile.getInt32("channellist_progressbar_design", g_settings.theme.progressbar_design);
g_settings.theme.progressbar_gradient = configfile.getBool("progressbar_gradient", false);
g_settings.theme.progressbar_timescale_red = configfile.getInt32("progressbar_timescale_red", 0);
g_settings.theme.progressbar_timescale_green = configfile.getInt32("progressbar_timescale_green", 100);
g_settings.theme.progressbar_timescale_yellow = configfile.getInt32("progressbar_timescale_yellow", 70);
g_settings.theme.progressbar_timescale_invert = configfile.getBool("progressbar_timescale_invert", false);
configfile.deleteKey("progressbar_design");
configfile.deleteKey("channellist_progressbar_design");
configfile.deleteKey("progressbar_color");
configfile.deleteKey("progressbar_gradient");
configfile.deleteKey("progressbar_timescale_red");
configfile.deleteKey("progressbar_timescale_green");
configfile.deleteKey("progressbar_timescale_yellow");
configfile.deleteKey("progressbar_timescale_invert");
}
if (g_settings.version_pseudo < "20170209181001")
{
//convert screen_x/yres keys to font_scaling_x/y
g_settings.font_scaling_x = configfile.getInt32("screen_xres", 100);
g_settings.font_scaling_y = configfile.getInt32("screen_yres", 100);
configfile.deleteKey("screen_xres");
configfile.deleteKey("screen_yres");
}
if (g_settings.version_pseudo < "20170209181002")
{
//remove screen_width/height keys
configfile.deleteKey("screen_width");
configfile.deleteKey("screen_height");
}
if (g_settings.version_pseudo < "20170516150000")
{
if (g_settings.movieplayer_bisection_jump == 1)
g_settings.movieplayer_bisection_jump = 5;
}
if (g_settings.version_pseudo < "20170606000000")
{
//remove CProgressBar::PB_GRAPHIC
if (g_settings.theme.progressbar_design == 4 /*CProgressBar::PB_GRAPHIC*/)
{
g_settings.theme.progressbar_design = CProgressBar::PB_MONO;
g_settings.theme.progressbar_gradient = 1;
}
}
if (g_settings.version_pseudo < "20170606215500")
{
//align fontsize.filebrowser_item to new default
if (configfile.getInt32("fontsize.filebrowser_item", 16) == 16)
configfile.setInt32("fontsize.filebrowser_item", 17);
}
if (g_settings.version_pseudo < "20170904080000")
{
//add flagfile for periodically update-check
if (g_settings.mode_icons_flag[4].empty())
g_settings.mode_icons_flag[4] = FLAGDIR "/.update";
}
if (g_settings.version_pseudo < "20170913110000")
{
//remove easymenu
configfile.deleteKey("easymenu");
}
if (g_settings.version_pseudo < "20180123160000")
{
// apply tuxtxt font changes
if (g_settings.font_file_monospace == FONTDIR "/DejaVuLGCSansMono-Bold.ttf")
g_settings.font_file_monospace = FONTDIR "/tuxtxt.ttf";
}
if (g_settings.version_pseudo < "20181216000000")
{
// apply key changes; KEY_EXIT => KEY_HOME
if (g_settings.key_channelList_cancel == 174)
g_settings.key_channelList_cancel = 102;
if (g_settings.key_zaphistory == 174)
g_settings.key_zaphistory = 102;
}
if (g_settings.version_pseudo < "20190106000000")
{
#ifdef ENABLE_LCD4LINUX
// move lcd4linux user skin from value 4 to value 100
if (g_settings.lcd4l_skin == 4)
g_settings.lcd4l_skin = 100;
#endif
}
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");
}
if (g_settings.version_pseudo < "20190305000000")
{
configfile.deleteKey("channellist_primetime");
}
if (g_settings.version_pseudo < "20200711000000")
{
#ifdef ENABLE_GRAPHLCD
configfile.deleteKey("glcd_show_logo");
#endif
}
if (g_settings.version_pseudo < "20201220000000")
{
#ifdef ENABLE_GRAPHLCD
if (strcmp(g_info.hw_caps->boxvendor, "VU+") != 0)
g_settings.glcd_enable = 0;
#endif
}
if (g_settings.version_pseudo < "20212344000000")
{
// force new keys for pip
g_settings.key_switchformat = CRCInput::RC_nokey;
g_settings.key_next43mode = CRCInput::RC_nokey;
#if ENABLE_PIP
g_settings.key_pip_close = CRCInput::RC_prev;
g_settings.key_pip_setup = CRCInput::RC_nokey;
g_settings.key_pip_swap = CRCInput::RC_next;
#endif
}
if (g_settings.version_pseudo < "20210331000000")
{
// switch g_settings.screen_preset