mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
add entry to load saved epg data manual
This commit is contained in:
@@ -58,6 +58,8 @@
|
||||
#include <cs_api.h>
|
||||
#include <video.h>
|
||||
|
||||
#include <sectionsdclient/sectionsdclient.h>
|
||||
|
||||
extern CPlugins * g_PluginList;
|
||||
extern cVideo *videoDecoder;
|
||||
|
||||
@@ -69,6 +71,7 @@ CMiscMenue::CMiscMenue()
|
||||
epg_save_standby = NULL;
|
||||
epg_save_frequently = NULL;
|
||||
epg_read = NULL;
|
||||
epg_read_now = NULL;
|
||||
epg_read_frequently = NULL;
|
||||
epg_dir = NULL;
|
||||
}
|
||||
@@ -141,6 +144,12 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
{
|
||||
return showMiscSettingsMenuOnlineServices();
|
||||
}
|
||||
else if(actionKey == "epg_read_now")
|
||||
{
|
||||
printf("Reading epg cache from %s....\n", g_settings.epg_dir.c_str());
|
||||
g_Sectionsd->readSIfromXML(g_settings.epg_dir.c_str());
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
|
||||
return showMiscSettingsMenu();
|
||||
}
|
||||
@@ -422,6 +431,9 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg)
|
||||
epg_dir = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, (g_settings.epg_save || g_settings.epg_read), g_settings.epg_dir, this, "epgdir");
|
||||
epg_dir->setHint("", LOCALE_MENU_HINT_EPG_DIR);
|
||||
|
||||
epg_read_now = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_READ_NOW, g_settings.epg_read, NULL, this, "epg_read_now");
|
||||
epg_read_now->setHint("", LOCALE_MENU_HINT_EPG_READ_NOW);
|
||||
|
||||
epg_cache = to_string(g_settings.epg_cache);
|
||||
if (epg_cache.length() < 2)
|
||||
epg_cache.insert(0, 2 - epg_cache.length(), ' ');
|
||||
@@ -468,6 +480,7 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg)
|
||||
ms_epg->addItem(epg_read);
|
||||
ms_epg->addItem(epg_read_frequently);
|
||||
ms_epg->addItem(epg_dir);
|
||||
ms_epg->addItem(epg_read_now);
|
||||
ms_epg->addItem(GenericMenuSeparatorLine);
|
||||
ms_epg->addItem(mf);
|
||||
ms_epg->addItem(mf1);
|
||||
@@ -641,6 +654,7 @@ bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void * /*data*
|
||||
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_READ))
|
||||
{
|
||||
epg_read_frequently->setActive(g_settings.epg_read);
|
||||
epg_read_now->setActive(g_settings.epg_read);
|
||||
epg_dir->setActive(g_settings.epg_read || g_settings.epg_save);
|
||||
|
||||
CNeutrinoApp::getInstance()->SendSectionsdConfig();
|
||||
|
Reference in New Issue
Block a user