From 25d2e3e8f53145a50883d984cd4ce20243bc02bd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 14 Feb 2023 20:27:40 +0100 Subject: [PATCH] scan-setup: auto-reload webchannels when reload channellists Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2981c207de23add1e360789f3c7c56e05ef25baf Author: vanhofen Date: 2023-02-14 (Tue, 14 Feb 2023) Origin message was: ------------------ - scan-setup: auto-reload webchannels when reload channellists ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/scan_setup.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index 5396f84c0..64fd52d5b 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -463,13 +464,18 @@ int CScanSetup::exec(CMenuTarget* parent, const std::string &actionKey) chb.paint(); /* save if changed, to make sure NEW/REMOVED/... flags are updated */ CServiceManager::getInstance()->SaveServices(true, true); + /* WebTV/Radio auto reload */ + CWebChannelsSetup webchannelssetup; + g_settings.webtv_xml.clear(); + webchannelssetup.webtv_xml_auto(); + g_settings.webradio_xml.clear(); + webchannelssetup.webradio_xml_auto(); /* Z->reinitChannels triggers EVT_SERVICESCHANGED and this triggers channelsInit() */ g_Zapit->reinitChannels(); chb.hide(); - CNeutrinoApp::getInstance ()->SDTreloadChannels = false; - if(file_exists(CURRENTSERVICES_XML)){ + CNeutrinoApp::getInstance()->SDTreloadChannels = false; + if (file_exists(CURRENTSERVICES_XML)) unlink(CURRENTSERVICES_XML); - } return res; } else if(actionKey == "satsetup")