Ticket #2655: mythtvsmartdup.2.patch

File mythtvsmartdup.2.patch, 4.0 KB (added by martin@…, 17 years ago)

Updated patch remove '(smart)' from name and using op 'else'

  • libs/libmythtv/recordingtypes.h

     
    3535    kDupCheckNone     = 0x01,
    3636    kDupCheckSub      = 0x02,
    3737    kDupCheckDesc     = 0x04,
    38     kDupCheckSubDesc  = 0x06
     38    kDupCheckSubDesc  = 0x06,
     39    kDupCheckSmart    = 0x08
    3940};
    4041
    4142enum RecSearchType
  • libs/libmythtv/sr_items.h

     
    321321            : SRSelectSetting(_parent, "dupMethodList", QObject::tr("[ Match duplicates with ]"), _group,
    322322                              "dupmethod", _list)
    323323        {
     324            addSelection(QObject::tr("Match duplicates using subtitle else description"), kDupCheckSmart);
    324325            addSelection(QObject::tr("Match duplicates using subtitle & description"), kDupCheckSubDesc);
    325326            addSelection(QObject::tr("Match duplicates using subtitle"), kDupCheckSub);
    326327            addSelection(QObject::tr("Match duplicates using description"), kDupCheckDesc);
    327328            addSelection(QObject::tr("Don't match duplicates"), kDupCheckNone);
    328             setValue(kDupCheckSubDesc);
     329            setValue(kDupCheckSmart);
    329330            _parent->setDupMethodObj(this);
    330331        }
    331332};
  • libs/libmythtv/programinfo.cpp

     
    103103    parentid = 0;
    104104    rectype = kNotRecording;
    105105    dupin = kDupsInAll;
    106     dupmethod = kDupCheckSubDesc;
     106    dupmethod = kDupCheckSmart;
    107107
    108108    sourceid = 0;
    109109    inputid = 0;
     
    13491349         (description.lower() != other.description.lower())))
    13501350        return false;
    13511351
     1352    if ((dupmethod & kDupCheckSmart) &&
     1353        ((subtitle == "" && other.subtitle == "" && description.lower() != other.description.lower()) ||
     1354         (subtitle.lower() != other.subtitle.lower()) ||
     1355         (description == "" && subtitle == "")))
     1356        return false;
     1357
    13521358    return true;
    13531359}
    13541360
  • libs/libmythtv/scheduledrecording.cpp

     
    788788    profile->setValue(QObject::tr("Default"));
    789789   
    790790    dupin->setValue(kDupsInAll);
    791     dupmethod->setValue(kDupCheckSubDesc);
     791    dupmethod->setValue(kDupCheckSmart);
    792792    maxepisodes->setValue(0);
    793793    startoffset->setValue(gContext->GetNumSetting("DefaultStartOffset", 0));
    794794    endoffset->setValue(gContext->GetNumSetting("DefaultEndOffset", 0));
  • programs/mythbackend/scheduler.cpp

     
    22202220"       AND "
    22212221"       (((RECTABLE.dupmethod & 0x04) = 0) OR (program.description <> '' "
    22222222"          AND program.description = oldrecorded.description)) "
     2223"       AND "
     2224"       (((RECTABLE.dupmethod & 0x08) = 0) OR (program.subtitle <> '' "
     2225"          AND program.subtitle = oldrecorded.subtitle) OR (program.subtitle = ''  "
     2226"          AND oldrecorded.subtitle = '' AND program.description <> '' "
     2227"          AND program.description = oldrecorded.description)) "
    22232228"      ) "
    22242229"     ) "
    22252230"  ) "
     
    22472252"       AND "
    22482253"       (((RECTABLE.dupmethod & 0x04) = 0) OR (program.description <> '' "
    22492254"          AND program.description = recorded.description)) "
     2255"       AND "
     2256"       (((RECTABLE.dupmethod & 0x08) = 0) OR (program.subtitle <> '' "
     2257"          AND program.subtitle = recorded.subtitle) OR (program.subtitle = ''  "
     2258"          AND recorded.subtitle = '' AND program.description <> '' "
     2259"          AND program.description = recorded.description)) "
    22502260"      ) "
    22512261"     ) "
    22522262"  ) "