usermenu: add read epg to epg function (thx to DboxOldie)

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3f3d3b2df6
Author: vanhofen <vanhofen@gmx.de>
Date: 2020-02-18 (Tue, 18 Feb 2020)

Origin message was:
------------------
- usermenu: add read epg to epg function (thx to DboxOldie)

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2020-02-18 22:45:43 +01:00
parent 5ad8df1ce8
commit 18d8ff083d
2 changed files with 11 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
{
return showMiscSettingsSelectWeatherLocation();
}
else if(actionKey == "epg_read_now")
else if(actionKey == "epg_read_now" || actionKey == "epg_read_now_usermenu")
{
struct stat my_stat;
if (stat(g_settings.epg_dir.c_str(), &my_stat) == 0)
@@ -168,6 +168,9 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
g_Sectionsd->readSIfromXMLTV((*it).c_str());
}
if (actionKey == "epg_read_now_usermenu")
return menu_return::RETURN_EXIT_ALL;
else
return menu_return::RETURN_REPAINT;
}

View File

@@ -81,6 +81,7 @@
#include <gui/hdd_menu.h>
#include <gui/test_menu.h> //NI
#include <gui/webtv_setup.h>
#include <gui/miscsettings_menu.h>
#include <driver/radiotext.h>
#include <driver/record.h>
@@ -252,6 +253,11 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
}
case SNeutrinoSettings::ITEM_EPG_MISC:
{
keyhelper.get(&key,&icon);
menu_item = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_READ_NOW, g_settings.epg_read, NULL, new CMiscMenue(), "epg_read_now_usermenu", key, icon);
menu_item->setHint("", LOCALE_MENU_HINT_EPG_READ_NOW);
menu->addItem(menu_item, false);
dummy = g_Sectionsd->getIsScanningActive();
keyhelper.get(&key,&icon);
menu_item = new CMenuOptionChooser(LOCALE_MAINMENU_PAUSESECTIONSD, &dummy, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this , key, icon );