diff --git a/mythtv/programs/mythfrontend/progfind.cpp b/mythtv/programs/mythfrontend/progfind.cpp
index 2bcc94a..960d8dc 100644
a
|
b
|
void ProgFinder::selectShowData(QString progTitle, int newCurShow) |
567 | 567 | |
568 | 568 | MSqlBindings bindings; |
569 | 569 | QString querystr = "WHERE program.title = :TITLE " |
570 | | " AND program.endtime > :ENDTIME "; |
| 570 | " AND program.endtime > :ENDTIME " |
| 571 | " AND channel.visible = 1 "; |
571 | 572 | bindings[":TITLE"] = progTitle; |
572 | 573 | bindings[":ENDTIME"] = progStart.toString("yyyy-MM-ddThh:mm:50"); |
573 | 574 | |
… |
… |
void ProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindings |
602 | 603 | |
603 | 604 | if (searchChar.contains('@')) |
604 | 605 | { |
605 | | where = "SELECT DISTINCT title FROM program WHERE ( " |
606 | | "title NOT REGEXP '^[A-Z0-9]' AND " |
607 | | "title NOT REGEXP '^The [A-Z0-9]' AND " |
608 | | "title NOT REGEXP '^A [A-Z0-9]' AND " |
609 | | "title NOT REGEXP '^An [A-Z0-9]' AND " |
610 | | "starttime > :STARTTIME ) "; |
| 606 | where = "SELECT DISTINCT title FROM program " |
| 607 | "LEFT JOIN channel ON program.chanid = channel.chanid " |
| 608 | "WHERE channel.visible = 1 AND " |
| 609 | "( title NOT REGEXP '^[A-Z0-9]' AND " |
| 610 | " title NOT REGEXP '^The [A-Z0-9]' AND " |
| 611 | " title NOT REGEXP '^A [A-Z0-9]' AND " |
| 612 | " title NOT REGEXP '^An [A-Z0-9]' AND " |
| 613 | " starttime > :STARTTIME ) "; |
611 | 614 | if (!m_searchStr.isEmpty()) |
612 | 615 | { |
613 | 616 | where += "AND title LIKE :SEARCH "; |
… |
… |
void ProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindings |
625 | 628 | QString three = QString("A ") + one; |
626 | 629 | QString four = QString("An ") + one; |
627 | 630 | |
628 | | where = "SELECT DISTINCT title " |
629 | | "FROM program " |
630 | | "WHERE ( title LIKE :ONE OR title LIKE :TWO " |
631 | | " OR title LIKE :THREE " |
632 | | " OR title LIKE :FOUR ) " |
| 631 | where = "SELECT DISTINCT title FROM program " |
| 632 | "LEFT JOIN channel ON program.chanid = channel.chanid " |
| 633 | "WHERE channel.visible = 1 " |
| 634 | "AND ( title LIKE :ONE OR title LIKE :TWO " |
| 635 | " OR title LIKE :THREE " |
| 636 | " OR title LIKE :FOUR ) " |
633 | 637 | "AND starttime > :STARTTIME "; |
634 | 638 | if (!m_searchStr.isEmpty()) |
635 | 639 | where += "AND title LIKE :SEARCH "; |
… |
… |
void JaProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindin |
782 | 786 | QDateTime progStart = QDateTime::currentDateTime(); |
783 | 787 | int charNum = m_alphabetList->GetCurrentPos(); |
784 | 788 | |
785 | | where = "SELECT DISTINCT title FROM program "; |
| 789 | where = "SELECT DISTINCT title FROM program " |
| 790 | "LEFT JOIN channel ON program.chanid = channel.chanid " |
| 791 | "WHERE channel.visible = 1 "; |
786 | 792 | |
787 | 793 | switch (charNum) { |
788 | 794 | case 0: |
789 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
| 795 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
790 | 796 | break; |
791 | 797 | case 1: |
792 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
| 798 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
793 | 799 | break; |
794 | 800 | case 2: |
795 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
| 801 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
796 | 802 | break; |
797 | 803 | case 3: |
798 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã©') "; |
| 804 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã©') "; |
799 | 805 | break; |
800 | 806 | case 4: |
801 | | where += "WHERE ( title_pronounce >= 'ãª' AND title_pronounce <= 'ã®') "; |
| 807 | where += "AND ( title_pronounce >= 'ãª' AND title_pronounce <= 'ã®') "; |
802 | 808 | break; |
803 | 809 | case 5: |
804 | | where += "WHERE ( title_pronounce >= 'ã¯' AND title_pronounce <= 'ãœ') "; |
| 810 | where += "AND ( title_pronounce >= 'ã¯' AND title_pronounce <= 'ãœ') "; |
805 | 811 | break; |
806 | 812 | case 6: |
807 | | where += "WHERE ( title_pronounce >= 'ãŸ' AND title_pronounce <= 'ã') "; |
| 813 | where += "AND ( title_pronounce >= 'ãŸ' AND title_pronounce <= 'ã') "; |
808 | 814 | break; |
809 | 815 | case 7: |
810 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
| 816 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
811 | 817 | break; |
812 | 818 | case 8: |
813 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
| 819 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
814 | 820 | break; |
815 | 821 | case 9: |
816 | | where += "WHERE ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
| 822 | where += "AND ( title_pronounce >= 'ã' AND title_pronounce <= 'ã') "; |
817 | 823 | break; |
818 | 824 | case 10: |
819 | | where += "WHERE ( title_pronounce >= '' AND title_pronounce <= 'ïœ') "; |
| 825 | where += "AND ( title_pronounce >= '' AND title_pronounce <= 'ïœ') "; |
820 | 826 | break; |
821 | 827 | case 11: |
822 | | where += "WHERE ( title_pronounce >= 'ïŒ' AND title_pronounce <= 'ïŒ') "; |
| 828 | where += "AND ( title_pronounce >= 'ïŒ' AND title_pronounce <= 'ïŒ') "; |
823 | 829 | break; |
824 | 830 | } |
825 | 831 | |
… |
… |
void HeProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings &bindin |
890 | 896 | if (searchChar.isEmpty()) |
891 | 897 | searchChar = searchChars[0]; |
892 | 898 | |
893 | | where = "SELECT DISTINCT title FROM program "; |
| 899 | where = "SELECT DISTINCT title FROM program " |
| 900 | "LEFT JOIN channel ON program.chanid = channel.chanid " |
| 901 | "WHERE channel.visible = 1 "; |
894 | 902 | |
895 | 903 | if (searchChar.contains('E')) |
896 | 904 | { |
897 | | where += "WHERE ( title REGEXP '^[A-Z]') "; |
| 905 | where += "AND ( title REGEXP '^[A-Z]') "; |
898 | 906 | } |
899 | 907 | else if (searchChar.contains('#')) |
900 | 908 | { |
901 | | where += "WHERE ( title REGEXP '^[0-9]') "; |
| 909 | where += "AND ( title REGEXP '^[0-9]') "; |
902 | 910 | } |
903 | 911 | else |
904 | 912 | { |
905 | 913 | QString one = searchChar + '%'; |
906 | 914 | bindings[":ONE"] = one; |
907 | | where += "WHERE ( title LIKE :ONE ) "; |
| 915 | where += "AND ( title LIKE :ONE ) "; |
908 | 916 | } |
909 | 917 | |
910 | 918 | where += "AND starttime > :STARTTIME "; |
… |
… |
void RuProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings |
982 | 990 | |
983 | 991 | if (searchChar.contains('@')) |
984 | 992 | { |
985 | | where = "SELECT DISTINCT title FROM program WHERE ( " |
| 993 | where = "SELECT DISTINCT title FROM program " |
| 994 | "LEFT JOIN channel ON program.chanid = channel.chanid " |
| 995 | "WHERE channel.visible = 1 AND " |
| 996 | "( " |
986 | 997 | "title NOT REGEXP '^[A-Z0-9]' AND " |
987 | 998 | "title NOT REGEXP '^The [A-Z0-9]' AND " |
988 | 999 | "title NOT REGEXP '^A [A-Z0-9]' AND " |
… |
… |
void RuProgFinder::whereClauseGetSearchData(QString &where, MSqlBindings |
1006 | 1017 | QString four = QString("An ") + one; |
1007 | 1018 | QString five = QString("\"") + one; |
1008 | 1019 | |
1009 | | where = "SELECT DISTINCT title " |
1010 | | "FROM program " |
1011 | | "WHERE ( title LIKE :ONE OR title LIKE :TWO " |
1012 | | " OR title LIKE :THREE " |
1013 | | " OR title LIKE :FOUR " |
1014 | | " OR title LIKE :FIVE )" |
| 1020 | where = "SELECT DISTINCT title FROM program " |
| 1021 | "LEFT JOIN channel ON program.chanid = channel.chanid " |
| 1022 | "WHERE channel.visible = 1 " |
| 1023 | "AND ( title LIKE :ONE OR title LIKE :TWO " |
| 1024 | " OR title LIKE :THREE " |
| 1025 | " OR title LIKE :FOUR " |
| 1026 | " OR title LIKE :FIVE )" |
1015 | 1027 | "AND starttime > :STARTTIME "; |
1016 | 1028 | if (!m_searchStr.isEmpty()) |
1017 | 1029 | where += "AND title LIKE :SEARCH "; |