Ticket #3966: 3966-v2.patch

File 3966-v2.patch, 1.3 KB (added by danielk, 17 years ago)

Try to be more agressive in finding matching channels

  • libs/libmythtv/tv_rec.cpp

     
    21592159    // sharing the prefix we were given.
    21602160
    21612161    // Is an extra characher useful for disambiguation?
    2162     if (query.exec(basequery.arg(prefix)))
    2163         is_extra_char_useful = query.next();
    2164     for (uint i = 0; i < ((is_extra_char_useful) ? 0 : fchannum.size()); i++)
     2162    is_extra_char_useful = false;
     2163    for (uint i = 0; (i < fchannum.size()) && !is_extra_char_useful; i++)
     2164    {
    21652165        is_extra_char_useful = (fchannum[i] != add_spacer(prefix, fspacer[i]));
     2166        VERBOSE(VB_IMPORTANT, "is_extra_char_useful("
     2167                <<fchannum[i]<<"!="<<add_spacer(prefix, fspacer[i])
     2168                <<"): "<<is_extra_char_useful);
     2169    }
    21662170
    21672171    // Are any of the channels complete w/o spacer?
    21682172    // If so set is_complete_valid_channel_on_rec,
     
    21912195    // then try to commit to any true match immediately.
    21922196    for (uint i = 0; i < ((is_extra_char_useful) ? 0 : fchanid.size()); i++)
    21932197    {
    2194         if (fcardid[i] != cardid)
    2195             break;
    2196 
    21972198        if (fchannum[i] == add_spacer(prefix, fspacer[i]))
    21982199        {
    21992200            needed_spacer = QDeepCopy<QString>(fspacer[i]);