CRecordInstance::FillMovieInfo supplement to 9455b0eeda , check current epg before we take title from timer

This commit is contained in:
Jacek Jendrzej
2014-01-18 19:58:40 +01:00
parent eba370d876
commit 14580b1dd1

View File

@@ -559,34 +559,31 @@ void CRecordInstance::FillMovieInfo(CZapitChannel * channel, APIDList & apid_lis
tmpstring = "not available"; tmpstring = "not available";
if (epgid != 0) { if (epgid != 0) {
CEPGData epgdata; CEPGData epgdata;
if (CEitManager::getInstance()->getEPGid(epgid, epg_time, &epgdata)) { bool epg_ok = CEitManager::getInstance()->getEPGid(epgid, epg_time, &epgdata);
tmpstring = epgdata.title; if(!epg_ok){//if old epgid removed check currurrent epgid
info1 = epgdata.info1; epg_ok = CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgdata );
info2 = epgdata.info2;
recMovieInfo->parentalLockAge = epgdata.fsk; if(epg_ok && !epgTitle.empty()){
if( !epgdata.contentClassification.empty() ) std::string tmp_title = epgdata.title;
recMovieInfo->genreMajor = epgdata.contentClassification[0]; if(epgTitle != tmp_title)
epg_ok = false;
recMovieInfo->length = epgdata.epg_times.dauer / 60;
printf("fsk:%d, Genre:%d, Dauer: %d\r\n",recMovieInfo->parentalLockAge,recMovieInfo->genreMajor,recMovieInfo->length);
} else if (!epgTitle.empty()) {//if old eepgid removed
tmpstring = epgTitle;
} else if(CEitManager::getInstance()->getActualEPGServiceKey(channel_id, &epgdata )){
tmpstring = epgdata.title;
info1 = epgdata.info1;
info2 = epgdata.info2;
recMovieInfo->parentalLockAge = epgdata.fsk;
if( !epgdata.contentClassification.empty() )
recMovieInfo->genreMajor = epgdata.contentClassification[0];
recMovieInfo->length = epgdata.epg_times.dauer / 60;
printf("fsk:%d, Genre:%d, Dauer: %d\r\n",recMovieInfo->parentalLockAge,recMovieInfo->genreMajor,recMovieInfo->length);
} }
}
if (epg_ok) {
tmpstring = epgdata.title;
info1 = epgdata.info1;
info2 = epgdata.info2;
recMovieInfo->parentalLockAge = epgdata.fsk;
if( !epgdata.contentClassification.empty() )
recMovieInfo->genreMajor = epgdata.contentClassification[0];
recMovieInfo->length = epgdata.epg_times.dauer / 60;
printf("fsk:%d, Genre:%d, Dauer: %d\r\n",recMovieInfo->parentalLockAge,recMovieInfo->genreMajor,recMovieInfo->length);
} else if (!epgTitle.empty()) {//if old epgid removed
tmpstring = epgTitle;
}
} else if (!epgTitle.empty()) { } else if (!epgTitle.empty()) {
tmpstring = epgTitle; tmpstring = epgTitle;
} }