From c69564aaf9f20077617ceec416d0d65fac7399da Mon Sep 17 00:00:00 2001 From: martii Date: Sat, 21 Dec 2013 21:43:25 +0100 Subject: [PATCH] zap back to previous channel id when recording from standby mode has finished [experimental, untested] Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/11b8541f4e457575f3a6d765051b2618b7ad55d7 Author: martii Date: 2013-12-21 (Sat, 21 Dec 2013) --- src/neutrino.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 1617d7fb7..f74ac2e2e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -133,7 +133,7 @@ char zapit_lat[20]="#"; char zapit_long[20]="#"; bool autoshift = false; uint32_t scrambled_timer; -t_channel_id standby_channel_id; +t_channel_id standby_channel_id = 0; //NEW static pthread_t timer_thread; @@ -2699,6 +2699,12 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) if(!CRecordManager::getInstance()->RecordingStatus() && (!data)) { if(mode == mode_standby) { + // zap back to pre-recording channel if necessary + t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID(); + if (standby_channel_id && (live_channel_id != standby_channel_id)) { + live_channel_id = standby_channel_id; + channelList->zapTo_ChannelID(live_channel_id); + } /* do not put zapit to standby, if epg scan not finished */ if (!CEpgScan::getInstance()->Running()) g_Zapit->setStandby(true);