| 515 | // This function gets special eit data from the French provider |
| 516 | // Canal Satellite Caraibes. It probably applies to this provider |
| 517 | // in France. This EIT is available for all channels for 7-10 days |
| 518 | void EITHelper::AddEIT(CSatCaraibesInformationTable *cit) |
| 519 | { |
| 520 | QString title = QString::null; |
| 521 | QString subtitle = QString::null; |
| 522 | QString description = QString::null; |
| 523 | QString category = QString::null; |
| 524 | MythCategoryType category_type = kCategoryNone; |
| 525 | unsigned char subtitle_type=0, audio_props=0, video_props=0; |
| 526 | uint fix = fixup[ 601LL << 32 | 1 << 16 | 0 ] | EITFixUp::kFixGenericDVB; |
| 527 | if (!cit->IsReady()) { |
| 528 | VERBOSE(VB_EIT,LOC+"CSAT EIT NOT READY YET"); |
| 529 | return; |
| 530 | } |
| 531 | for (uint i = 0;i < cit->NbSchedules();i++) { |
| 532 | const CSatCaraibesSchedule& schedule = cit->GetSchedule(i); |
| 533 | QString title = schedule.title; |
| 534 | const vector<CSatCaraibesShowing>& showings = schedule.showings; |
| 535 | QMap<uint, QString>::const_iterator sum; |
| 536 | bool sum_available = false; |
| 537 | |
| 538 | if (schedule.key) { |
| 539 | /* If the summary is not there we go on with the next schedule */ |
| 540 | if (!(cit->GetSummary(i, sum))) continue; |
| 541 | sum_available = true; |
| 542 | } |
| 543 | for (vector<CSatCaraibesShowing>::const_iterator it = showings.begin(); |
| 544 | it != showings.end();it++) { |
| 545 | QDateTime starttime = (*it).Start; |
| 546 | // EITFixUp::TimeFix(starttime); |
| 547 | QDateTime endtime = starttime.addSecs(schedule.duration*60); |
| 548 | uint chanid; |
| 549 | DBEvent *event; |
| 550 | const CSatCaraibesChannelInfo& info = cit->GetChannelInfoFromIndex((*it).channel_index); |
| 551 | chanid = GetChanID(info.tsid,info.serviceid,info.orignetworkid); |
| 552 | VERBOSE(VB_EIT, LOC + |
| 553 | QString("CSATCARAIBES EIT for NIT %1, TID %2, SID %3, " |
| 554 | "T: %4, Start: %5, Dur: %6 Thm: %7, summ: %8") |
| 555 | .arg(info.orignetworkid).arg(info.tsid).arg(info.serviceid) |
| 556 | .arg(title).arg(starttime.toString()).arg(schedule.duration) |
| 557 | .arg(schedule.theme).arg((sum_available ? *sum :"No summary"))); |
| 558 | |
| 559 | if (!chanid) |
| 560 | { |
| 561 | VERBOSE(VB_EIT, LOC + |
| 562 | QString("CSATCARAIBES EIT for NIT %1, TID %2, SID %3, " |
| 563 | "title: %4. Channel not found!") |
| 564 | .arg(info.orignetworkid).arg(info.tsid).arg(info.serviceid) |
| 565 | .arg(title)); |
| 566 | continue; |
| 567 | } |
| 568 | |
| 569 | /* event = new DBEvent(chanid, |
| 570 | title, QString::null, sum_available ? (*sum).value():"", |
| 571 | category, category_type, |
| 572 | starttime, endtime, fix, |
| 573 | subtitle_type, |
| 574 | audio_props, |
| 575 | video_props, |
| 576 | "", ""); |
| 577 | db_events.enqueue(event);*/ |
| 578 | } |
| 579 | } |
| 580 | } |