From 3468fffd75baeddd503f5d67db92d42e1fe78661 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 13 Mar 2012 14:07:15 +0400 Subject: [PATCH] neutrino.cpp: change lastChannelRadio/lastChannelTV from number to channel_id --- src/neutrino.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index efd759bb4..8bce5958d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1146,7 +1146,7 @@ void CNeutrinoApp::saveSetup(const char * fname) **************************************************************************************/ void CNeutrinoApp::firstChannel() { - g_Zapit->getLastChannel(firstchannel.channelNumber, firstchannel.mode); + g_Zapit->getLastChannel(firstchannel.channel_id, firstchannel.mode); } /************************************************************************************** @@ -3291,7 +3291,10 @@ void CNeutrinoApp::tvMode( bool rezap ) if( rezap ) { firstChannel(); channelList->setSelected(0xfffffff); /* make sure that zapTo_ChannelID will zap */ - channelList->zapTo( firstchannel.channelNumber -1 ); + if(CServiceManager::getInstance()->FindChannel(firstchannel.channel_id)) + channelList->zapTo_ChannelID( firstchannel.channel_id ); + else + channelList->zapTo(0); } #ifdef USEACTIONLOG g_ActionLog->println("mode: tv"); @@ -3495,7 +3498,10 @@ void CNeutrinoApp::radioMode( bool rezap) if( rezap ) { firstChannel(); channelList->setSelected(0xfffffff); /* make sure that zapTo_ChannelID will zap */ - channelList->zapTo( firstchannel.channelNumber -1 ); + if(CServiceManager::getInstance()->FindChannel(firstchannel.channel_id)) + channelList->zapTo_ChannelID( firstchannel.channel_id ); + else + channelList->zapTo(0); } videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");