zap back to previous channel id when recording from standby mode has finished [experimental, untested]

This commit is contained in:
martii
2013-12-21 21:43:25 +01:00
committed by Jacek Jendrzej
parent 31f93c4740
commit 11b8541f4e

View File

@@ -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);