Ticket #4327: eitfixup11.patch
File eitfixup11.patch, 4.9 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/eitfixup.cpp
18 18 m_ukSubtitle("\\[.*S\\]"), 19 19 m_ukThen("\\s*(Then|Followed by) 60 Seconds\\.", false), 20 20 m_ukNew("\\s*(Brand New|New)\\s*(Series|Episode)\\s*[:\\.\\-]",false), 21 m_ukNew1(" ^New\\."),21 m_ukNew1("New\\."), 22 22 m_ukT4("^[tT]4:"), 23 23 m_ukEQ("[:\\!\\?]"), 24 24 m_ukEPQ("[:\\!\\.\\?]"), 25 m_ukColonHyphen("[:-]"),26 25 m_ukPStart("^\\.+"), 27 26 m_ukPEnd("\\.+$"), 28 27 m_ukSeries1("\\s*(\\d{1,2})/(\\d{1,2})"), … … 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\\."), 46 m_ukYearColon("^\\d\\d\\d\\d:"), 44 47 m_comHemCountry("^(\\(.+\\))?\\s?([^ ]+)\\s([^\\.0-9]+)" 45 48 "(?:\\sfrån\\s([0-9]{4}))(?:\\smed\\s([^\\.]+))?\\.?"), 46 49 m_comHemDirector("[Rr]egi"), … … 362 365 event.description = event.description.remove(m_ukCBBC); 363 366 event.description = event.description.remove(m_ukCBeebies); 364 367 368 // Removal of BBC FOUR and BBC THREE 369 event.description = event.description.remove(m_ukBBC4); 370 event.description = event.description.remove(m_ukBBC3); 371 372 // Removal of BBC Switch 373 event.description = event.description.remove(m_ukBBCSwitch); 374 365 375 // BBC 7 [Rpt of ...] case. 366 376 event.description = event.description.remove(m_ukBBC7rpt); 367 377 … … 383 393 position1++; 384 394 event.title = strFull.left(position1); 385 395 event.description = strFull.mid(position1 + 1); 386 event.description = event.description.remove(m_ukNew1);387 396 SetUKSubtitle(event); 388 397 } 389 398 if ((position1 = strFull.find(m_ukYear)) != -1) … … 406 415 } 407 416 else if ((position1 = event.description.find(m_ukTime)) == -1) 408 417 { 409 if (((position1 = event.title.find(m_ukColonHyphen)) != -1) && 410 (event.description.find(":") < 0 )) 418 if (event.title.find(m_ukYearColon) < 0) 411 419 { 412 if ((uint)position1 < SUBTITLE_MAX_LEN) 420 if (((position1 = event.title.find(":")) != -1) && 421 (event.description.find(":") < 0 )) 413 422 { 414 event.subtitle = event.title.mid(position1 + 1); 415 event.title = event.title.left(position1); 423 if ((uint)position1 < SUBTITLE_MAX_LEN) 424 { 425 event.subtitle = event.title.mid(position1 + 1); 426 event.title = event.title.left(position1); 427 } 416 428 } 429 else 430 SetUKSubtitle(event); 417 431 } 418 else419 SetUKSubtitle(event);420 432 } 421 433 } 422 434 … … 515 527 { 516 528 event.partnumber = tmpExp1.cap(1).toUInt(); 517 529 event.parttotal = tmpExp1.cap(2).toUInt(); 530 // Remove from the description 531 event.description = event.description.left(position1) + 532 event.description.mid(position1+tmpExp1.cap(0).length()); 518 533 series = true; 519 534 } 520 535 } … … 522 537 { 523 538 event.partnumber = tmpExp2.cap(2).toUInt(); 524 539 event.parttotal = tmpExp2.cap(3).toUInt(); 540 // Remove from the description 541 event.description = event.description.left(position1) + 542 event.description.mid(position1+tmpExp2.cap(0).length()); 525 543 series = true; 526 544 } 527 545 else if ((position1 = tmpExp3.search(event.description)) != -1) 528 546 { 529 547 event.partnumber = tmpExp3.cap(1).toUInt(); 530 548 event.parttotal = tmpExp3.cap(2).toUInt(); 549 // Remove from the description 550 event.description = event.description.left(position1) + 551 event.description.mid(position1+tmpExp3.cap(0).length()); 531 552 series = true; 532 553 } 533 554 if (series) -
libs/libmythtv/eitfixup.h
86 86 const QRegExp m_ukT4; 87 87 const QRegExp m_ukEQ; 88 88 const QRegExp m_ukEPQ; 89 const QRegExp m_ukColonHyphen;90 89 const QRegExp m_ukPStart; 91 90 const QRegExp m_ukPEnd; 92 91 const QRegExp m_ukSeries1; … … 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; 109 const QRegExp m_ukYearColon; 107 110 const QRegExp m_comHemCountry; 108 111 const QRegExp m_comHemDirector; 109 112 const QRegExp m_comHemActor;