Add nvodchannels to search for channel id

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1617 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2011-08-09 13:15:15 +00:00
parent e0ee8a723c
commit cfafa606ab
2 changed files with 25 additions and 10 deletions

View File

@@ -64,6 +64,7 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
extern t_channel_id live_channel_id; extern t_channel_id live_channel_id;
extern t_channel_id rec_channel_id; extern t_channel_id rec_channel_id;
extern tallchans allchans; extern tallchans allchans;
extern tallchans nvodchannels;
bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata);
bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata);
@@ -221,8 +222,11 @@ bool CRecordInstance::Update()
tallchans_iterator cit = allchans.find(channel_id); tallchans_iterator cit = allchans.find(channel_id);
if(cit == allchans.end()) { if(cit == allchans.end()) {
printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id); cit = nvodchannels.find(channel_id);
return false; if(cit == nvodchannels.end()) {
printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id);
return false;
}
} }
CZapitChannel * channel = &(cit->second); CZapitChannel * channel = &(cit->second);
@@ -353,8 +357,11 @@ record_error_msg_t CRecordInstance::Record()
printf("%s: channel %llx recording_id %d\n", __FUNCTION__, channel_id, recording_id); printf("%s: channel %llx recording_id %d\n", __FUNCTION__, channel_id, recording_id);
tallchans_iterator cit = allchans.find(channel_id); tallchans_iterator cit = allchans.find(channel_id);
if(cit == allchans.end()) { if(cit == allchans.end()) {
printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id); cit = nvodchannels.find(channel_id);
return RECORD_INVALID_CHANNEL; if(cit == nvodchannels.end()) {
printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id);
return RECORD_INVALID_CHANNEL;
}
} }
CZapitChannel * channel = &(cit->second); CZapitChannel * channel = &(cit->second);
@@ -602,10 +609,14 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel)
void CRecordInstance::GetRecordString(std::string &str) void CRecordInstance::GetRecordString(std::string &str)
{ {
tallchans_iterator cit = allchans.find(channel_id); tallchans_iterator cit = allchans.find(channel_id);
if(cit == allchans.end()) if(cit == allchans.end()) {
str = "Unknown channel : " + GetEpgTitle(); cit = nvodchannels.find(channel_id);
else if(cit == nvodchannels.end()) {
str = cit->second.getName() + ": " + GetEpgTitle(); str = "Unknown channel : " + GetEpgTitle();
return;
}
}
str = cit->second.getName() + ": " + GetEpgTitle();
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -29,6 +29,7 @@
#include <zapit/satconfig.h> #include <zapit/satconfig.h>
extern tallchans allchans; extern tallchans allchans;
extern tallchans nvodchannels;
CCam::CCam() CCam::CCam()
{ {
@@ -137,8 +138,11 @@ bool CCamManager::SetMode(t_channel_id id, enum runmode mode, bool start, bool f
tallchans_iterator cit = allchans.find(id); tallchans_iterator cit = allchans.find(id);
if(cit == allchans.end()) { if(cit == allchans.end()) {
printf("CCamManager: channel %llx not found\n", id); cit = nvodchannels.find(id);
return false; if(cit == nvodchannels.end()) {
printf("CCamManager: channel %llx not found\n", id);
return false;
}
} }
CZapitChannel * channel = &(cit->second); CZapitChannel * channel = &(cit->second);