Ticket #4327: eitfixup10.patch
File eitfixup10.patch, 4.8 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/eitfixup.cpp
15 15 m_bellPPVDescriptionAllDay("^\\(.*\\sEastern\\)"), 16 16 m_bellPPVDescriptionAllDay2("^\\([0-9].*am-[0-9].*am\\sET\\)"), 17 17 m_bellPPVDescriptionEventId("\\([0-9]{5}\\)"), 18 m_ukSubtitle("\\[.*S\\]"),19 18 m_ukThen("\\s*(Then|Followed by) 60 Seconds\\.", false), 20 19 m_ukNew("\\s*(Brand New|New)\\s*(Series|Episode)\\s*[:\\.\\-]",false), 21 m_ukNew1(" ^New\\."),20 m_ukNew1("New\\."), 22 21 m_ukT4("^[tT]4:"), 23 22 m_ukEQ("[:\\!\\?]"), 24 23 m_ukEPQ("[:\\!\\.\\?]"), … … 41 40 m_ukDoubleDotStart("^\\.\\.+"), 42 41 m_ukDotSpaceStart("^\\. "), 43 42 m_ukTime("\\d{1,2}[\\.:]\\d{1,2}\\s*(am|pm|)"), 43 m_ukBBC3("BBC THREE on BBC TWO\\.",false), 44 m_ukBBC4("BBC FOUR on BBC TWO\\.",false), 45 m_ukBBCSwitch("BBC Switch\\."), 44 46 m_comHemCountry("^(\\(.+\\))?\\s?([^ ]+)\\s([^\\.0-9]+)" 45 47 "(?:\\sfrån\\s([0-9]{4}))(?:\\smed\\s([^\\.]+))?\\.?"), 46 48 m_comHemDirector("[Rr]egi"), … … 344 346 int position2; 345 347 QString strFull; 346 348 347 position1 = event.description.find(m_ukSubtitle);348 if (position1 != -1)349 {350 event.flags |= DBEvent::kSubtitled;351 event.description.remove(m_ukSubtitle);352 }353 354 349 // BBC three case (could add another record here ?) 355 350 event.description = event.description.remove(m_ukThen); 356 351 event.description = event.description.remove(m_ukNew); … … 362 357 event.description = event.description.remove(m_ukCBBC); 363 358 event.description = event.description.remove(m_ukCBeebies); 364 359 360 // Removal of BBC FOUR and BBC THREE 361 event.description = event.description.remove(m_ukBBC4); 362 event.description = event.description.remove(m_ukBBC3); 363 364 // Removal of BBC Switch 365 event.description = event.description.remove(m_ukBBCSwitch); 366 365 367 // BBC 7 [Rpt of ...] case. 366 368 event.description = event.description.remove(m_ukBBC7rpt); 367 369 … … 369 371 event.description = event.description.stripWhiteSpace(); 370 372 371 373 QRegExp tmp24ep = m_uk24ep; 372 if (!event.title.startsWith("CSI:") && !event.title.startsWith("CD:")) 374 if (!event.title.startsWith("CSI:") && !event.title.startsWith("CD:") && 375 !event.title.startsWith("Non-Stop Q Music 24/7")) 373 376 { 374 377 if (((position1=event.title.find(m_ukDoubleDotEnd)) != -1) && 375 378 ((position2=event.description.find(m_ukDoubleDotStart)) != -1)) … … 383 386 position1++; 384 387 event.title = strFull.left(position1); 385 388 event.description = strFull.mid(position1 + 1); 386 event.description = event.description.remove(m_ukNew1);387 389 SetUKSubtitle(event); 388 390 } 389 391 if ((position1 = strFull.find(m_ukYear)) != -1) … … 515 517 { 516 518 event.partnumber = tmpExp1.cap(1).toUInt(); 517 519 event.parttotal = tmpExp1.cap(2).toUInt(); 520 // Remove from the description 521 event.description = event.description.left(position1) + 522 event.description.mid(position1+tmpExp1.cap(0).length()); 518 523 series = true; 519 524 } 520 525 } … … 522 527 { 523 528 event.partnumber = tmpExp2.cap(2).toUInt(); 524 529 event.parttotal = tmpExp2.cap(3).toUInt(); 530 // Remove from the description 531 event.description = event.description.left(position1) + 532 event.description.mid(position1+tmpExp2.cap(0).length()); 525 533 series = true; 526 534 } 527 535 else if ((position1 = tmpExp3.search(event.description)) != -1) 528 536 { 529 537 event.partnumber = tmpExp3.cap(1).toUInt(); 530 538 event.parttotal = tmpExp3.cap(2).toUInt(); 539 // Remove from the description 540 event.description = event.description.left(position1) + 541 event.description.mid(position1+tmpExp3.cap(0).length()); 531 542 series = true; 532 543 } 533 544 if (series) -
libs/libmythtv/eitfixup.h
79 79 const QRegExp m_bellPPVDescriptionAllDay; 80 80 const QRegExp m_bellPPVDescriptionAllDay2; 81 81 const QRegExp m_bellPPVDescriptionEventId; 82 const QRegExp m_ukSubtitle;83 82 const QRegExp m_ukThen; 84 83 const QRegExp m_ukNew; 85 84 const QRegExp m_ukNew1; … … 104 103 const QRegExp m_ukDoubleDotStart; 105 104 const QRegExp m_ukDotSpaceStart; 106 105 const QRegExp m_ukTime; 106 const QRegExp m_ukBBC3; 107 const QRegExp m_ukBBC4; 108 const QRegExp m_ukBBCSwitch; 107 109 const QRegExp m_comHemCountry; 108 110 const QRegExp m_comHemDirector; 109 111 const QRegExp m_comHemActor;