diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1d3e57d31..d986f00d5 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1550,6 +1550,7 @@ void CNeutrinoApp::InitZapper() } firstChannel(); lastChannelMode = g_settings.channel_mode; + SDTreloadChannels = false; channelsInit(); if(firstchannel.mode == 't') { @@ -2865,8 +2866,9 @@ _repeat: return messages_return::handled; } else if (msg == NeutrinoMessages::EVT_SERVICES_UPD) { - ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED), - CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO); + SDTreloadChannels = true; +// ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED), +// CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO); } if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) delete [] (unsigned char*) data; @@ -2889,6 +2891,11 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) } if(do_shutdown) { + if(SDTreloadChannels){ + SDT_ReloadChannels(); + SDTreloadChannels = false; + } + CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN); delete CRecordManager::getInstance(); @@ -3321,7 +3328,10 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) //g_Controld->setScartMode( 0 ); } StopSubtitles(); - + if(SDTreloadChannels && !CRecordManager::getInstance()->RecordingStatus()){ + SDT_ReloadChannels(); + SDTreloadChannels = false; + } frameBuffer->useBackground(false); frameBuffer->paintBackground(); @@ -3937,3 +3947,16 @@ void CNeutrinoApp::SelectSubtitles() } } } +void CNeutrinoApp::SDT_ReloadChannels() +{ + g_Zapit->reinitChannels(); + channelsInit(); + t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); + channelList->adjustToChannelID(live_channel_id);//FIXME what if deleted ? + if(old_b_id >= 0) { + bouquetList->activateBouquet(old_b_id, false); + old_b_id = -1; + g_RCInput->postMsg(CRCInput::RC_ok, 0); + } + +} \ No newline at end of file diff --git a/src/neutrino.h b/src/neutrino.h index 76da39e1a..79b2100cd 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -130,7 +130,7 @@ private: // bool fromflash; bool init_cec_setting; int lastChannelMode; - + bool SDTreloadChannels; struct timeval standby_pressed_at; CZapitClient::responseGetLastChannel firstchannel; @@ -146,6 +146,7 @@ private: COnekeyPluginChangeExec *OnekeyPluginChanger; CIPChangeNotifier *MyIPChanger; + void SDT_ReloadChannels(); void firstChannel(); void setupNetwork( bool force= false ); void setupNFS();