From abea6d83d614df5defdd08cfddff402de6324f72 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 19 Aug 2015 17:58:08 +0200 Subject: [PATCH] src/gui/channellist.cpp: stop RECMODE_TSHIFT in play mode --- src/gui/channellist.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 90c72c92d..73d77c049 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -656,17 +656,23 @@ int CChannelList::show() } } else if(!edit_state && !empty && msg == CRCInput::RC_stop ) { //stop recording - //if(CRecordManager::getInstance()->RecordingStatus((*chanlist)[selected]->getChannelID())) - int recmode = CRecordManager::getInstance()->GetRecordMode((*chanlist)[selected]->getChannelID()); - bool timeshift = recmode & CRecordManager::RECMODE_TSHIFT; - bool tsplay = CMoviePlayerGui::getInstance().timeshift; - if (recmode && !(timeshift && tsplay)) - { - if (CRecordManager::getInstance()->AskToStop((*chanlist)[selected]->getChannelID())) + if(CRecordManager::getInstance()->RecordingStatus((*chanlist)[selected]->getChannelID())){ + int recmode = CRecordManager::getInstance()->GetRecordMode((*chanlist)[selected]->getChannelID()); + bool timeshift = recmode & CRecordManager::RECMODE_TSHIFT; + bool tsplay = CMoviePlayerGui::getInstance().timeshift; + if (recmode && !(timeshift && tsplay)) { - CRecordManager::getInstance()->Stop((*chanlist)[selected]->getChannelID()); - calcSize(); - paintBody(); + if (CRecordManager::getInstance()->AskToStop((*chanlist)[selected]->getChannelID())) + { + CRecordManager::getInstance()->Stop((*chanlist)[selected]->getChannelID()); + calcSize(); + paintBody(); + } + }else{ + // stop TSHIFT: go to play mode + g_RCInput->postMsg (msg, data); + res = CHANLIST_CANCEL_ALL; + loop = false; } } }