From 3c9ed9d57cb3e5e5f4e7d7b7a54e9a189fc4289e 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 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/abea6d83d614df5defdd08cfddff402de6324f72 Author: Jacek Jendrzej Date: 2015-08-19 (Wed, 19 Aug 2015) --- 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; } } }