Ticket #3544: athome-eit.diff
File athome-eit.diff, 4.1 KB (added by , 17 years ago) |
---|
-
mythtv/libs/libmythtv/eitfixup.cpp
diff -u -r -x .svn ./a/mythtv/libs/libmythtv/eitfixup.cpp ./mythtv/libs/libmythtv/eitfixup.cpp
./a . 71 71 if (kFixAUStar & event.fixup) 72 72 FixAUStar(event); 73 73 74 if (kFixAtHome & event.fixup) 75 FixAtHome(event); 76 74 77 if (event.fixup) 75 78 { 76 79 if (!event.title.isEmpty()) … … 629 632 event.description = stmp.right(stmp.length() - position - 2); 630 633 } 631 634 } 635 636 /** \fn EITFixUp::FixAtHome(DBEvent&) const 637 * \brief Use this to clean up DVB-C guide from AtHome in the Netherlands. 638 */ 639 void EITFixUp::FixAtHome(DBEvent &event) const 640 { 641 642 // Try to get the sub-title from the description (if empty). 643 if(event.subtitle.isEmpty()) 644 { 645 int position = event.description.find("Afl."); 646 if (position != -1) 647 { 648 // See if there's a ":" following, if so; ignore. 649 if(event.description.at(position + 4) == ':') 650 position++; 651 // now search for a "." indicating the end of the sub-title 652 int endposition = event.description.find('.', (position + 4)); 653 if (endposition != -1) 654 { 655 // Copy the found part 656 event.subtitle = event.description.mid(position + 4, 657 endposition - (position + 4)); 658 } 659 } 660 } 661 // Try to get a subtitle from the title by searching for a ":" and 662 // splitting the title 663 if(event.subtitle.isEmpty()) 664 { 665 int position = event.title.find(':'); 666 if (position != -1) 667 { 668 event.subtitle = event.title.right( 669 event.title.length() - position - 2); 670 event.title = event.title.left(position); 671 } 672 } 673 // There's more information in the description block but this is 674 // sufficient for me :-) 675 } -
mythtv/libs/libmythtv/eitfixup.h
diff -u -r -x .svn ./a/mythtv/libs/libmythtv/eitfixup.h ./mythtv/libs/libmythtv/eitfixup.h
./a . 27 27 kFixComHem = 0x0010, 28 28 kFixSubtitle = 0x0020, 29 29 kFixAUStar = 0x0040, 30 kFixAtHome = 0x0080, // Both early and regular 30 31 31 32 // Early fixups 32 33 kEFixPro7Sat = 0x0100, … … 51 52 void FixPBS(DBEvent &event) const; // USA ATSC 52 53 void FixComHem(DBEvent &event, bool parse_subtitle) const; // Sweden DVB-C 53 54 void FixAUStar(DBEvent &event) const; // Australia DVB-S 55 void FixAtHome(DBEvent &event) const; // Netherlands AtHome DVB-C 54 56 55 57 const QRegExp m_bellYear; 56 58 const QRegExp m_bellActors; -
mythtv/libs/libmythtv/eithelper.cpp
diff -u -r -x .svn ./a/mythtv/libs/libmythtv/eithelper.cpp ./mythtv/libs/libmythtv/eithelper.cpp
./a . 288 288 else 289 289 { 290 290 title = sed.EventName(); 291 subtitle = sed.Text(); 291 if (fix & EITFixUp::kFixAtHome) 292 description = sed.Text(); 293 else 294 subtitle = sed.Text(); 292 295 } 293 296 } 294 297 … … 296 299 MPEGDescriptor::FindBestMatches( 297 300 list, DescriptorID::extended_event, languagePreferences); 298 301 299 description = "";300 302 for (uint j = 0; j < bestExtendedEvents.size(); j++) 301 303 { 302 304 if (!bestExtendedEvents[j]) … … 584 586 fix[1082LL << 32 | 1 << 16 | 20005] = EITFixUp::kEFixPro7Sat; //DVB-S Sat.1 Austria 585 587 586 588 fix[ 133 << 16] = EITFixUp::kEFixPro7Sat; // Premiere and Pro7/Sat.1 589 590 // DVB-C Netherlands: EIT format and sub-title fixes 591 // transport_id<<32 | original_network_id<<16 | service_id 592 fix[ 1000 << 16 ] = EITFixUp::kFixAtHome; 593 587 594 } 588 595 589 596 static int calc_eit_utc_offset(void)