From bbecf5c7645cf6b1220a05926f96eff7077cd4da Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sat, 1 Sep 2018 14:34:25 +0200 Subject: [PATCH] - miscsettings-menu: read xmltv too when user requests a re-reading of epg Signed-off-by: Thilo Graf --- src/gui/miscsettings_menu.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 91d404962..d67c58517 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -142,8 +142,19 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) } 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()); + struct stat my_stat; + if (stat(g_settings.epg_dir.c_str(), &my_stat) == 0) + { + printf("Reading epg cache from %s ...\n", g_settings.epg_dir.c_str()); + g_Sectionsd->readSIfromXML(g_settings.epg_dir.c_str()); + } + + for (std::list::iterator it = g_settings.xmltv_xml.begin(); it != g_settings.xmltv_xml.end(); ++it) + { + printf("Reading xmltv epg from %s ...\n", (*it).c_str()); + g_Sectionsd->readSIfromXMLTV((*it).c_str()); + } + return menu_return::RETURN_REPAINT; }