channellist: set CI channel inactive if recording with CI

Origin commit data
------------------
Branch: ni/coolstream
Commit: 570d1b10f2
Author: FlatTV <FlatTV@gmx.de>
Date: 2016-06-25 (Sat, 25 Jun 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
FlatTV
2016-06-25 13:06:12 +02:00
parent d41cade3ac
commit fbab44c8c6
3 changed files with 21 additions and 0 deletions

View File

@@ -1783,6 +1783,22 @@ CRecordInstance* CRecordManager::getRecordInstance(std::string file)
return NULL;
}
//NI
CRecordInstance* CRecordManager::getUseCI()
{
mutex.lock();
for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) {
CRecordInstance * inst = it->second;
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(inst->GetChannelId());
if (channel->bUseCI) {
mutex.unlock();
return inst;
}
}
mutex.unlock();
return NULL;
}
#if 0
/* should return true, if recordingstatus changed in this function ? */
bool CRecordManager::doGuiRecord()

View File

@@ -233,6 +233,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
void StartTimeshift();
int GetRecordMode(const t_channel_id channel_id=0);
CRecordInstance* getRecordInstance(std::string file);
CRecordInstance* getUseCI(); //NI
// old code
#if 0
bool MountDirectory(const char *recordingDir);

View File

@@ -2265,6 +2265,10 @@ bool CChannelList::SameTP(CZapitChannel * channel)
if (IS_WEBTV(channel->getChannelID()))
return true;
//NI
if(channel->bUseCI && CRecordManager::getInstance()->getUseCI())
return false;
iscurrent = CFEManager::getInstance()->canTune(channel);
}
return iscurrent;