Ticket #1657: ignoreincomplete.3.patch

File ignoreincomplete.3.patch, 6.3 KB (added by Tony Lill <ajlill@…>, 16 years ago)
  • libs/libmythtv/sr_items.cpp

     
    3131    addItem(dupLocItem->getItem(), -1);
    3232    connect(dupMethItem->getItem(), SIGNAL(changed(ManagedListItem*)), this, SLOT(itemChanged(ManagedListItem*)));
    3333
     34    ignoreIncomplete = new SRIgnoreIncomplete(_rec, this, parentList);
     35    addItem(ignoreIncomplete->getItem(), -1);
     36
    3437    inactive = new SRInactive(_rec, this, _parentList);
    3538    addItem(inactive->getItem(), -1);
    3639}
  • libs/libmythtv/scheduledrecording.h

     
    2828class SRAutoUserJob3;
    2929class SRAutoUserJob4;
    3030class SRAutoExpire;
     31class SRIgnoreIncomplete;
    3132class SRStartOffset;
    3233class SREndOffset;
    3334class SRMaxEpisodes;
     
    8081    int GetAutoExpire(void) const;
    8182    void SetAutoExpire(int expire);
    8283
     84    int GetIgnoreIncomplete(void) const;
     85    void SetIgnoreIncomplete(int expire);
     86
    8387    int GetMaxEpisodes(void) const;
    8488    bool GetMaxNewest(void) const;
    8589
     
    150154    void setAutoUserJob3Obj(SRAutoUserJob3* val) {autouserjob3 = val;}
    151155    void setAutoUserJob4Obj(SRAutoUserJob4* val) {autouserjob4 = val;}
    152156    void setAutoExpireObj(SRAutoExpire* val) {autoexpire = val;}
     157    void setIgnoreIncompleteObj(SRIgnoreIncomplete* val) {ignoreincomplete = val;}
    153158    void setStartOffsetObj(SRStartOffset* val) {startoffset = val;}
    154159    void setEndOffsetObj(SREndOffset* val) {endoffset = val;}
    155160    void setMaxEpisodesObj(SRMaxEpisodes* val) {maxepisodes = val;}
     
    223228    class SRAutoUserJob3* autouserjob3;
    224229    class SRAutoUserJob4* autouserjob4;
    225230    class SRAutoExpire* autoexpire;
     231    class SRIgnoreIncomplete* ignoreincomplete;
    226232    class SRStartOffset* startoffset;
    227233    class SREndOffset* endoffset;
    228234    class SRMaxEpisodes* maxepisodes;
  • libs/libmythtv/sr_items.h

     
    394394        class SRDupIn* dupLocItem;
    395395        class SRInput* prefInput;
    396396        class SRInactive* inactive;
     397        class SRIgnoreIncomplete* ignoreIncomplete;
    397398
    398399        ScheduledRecording *schedRec;
    399400};
     
    719720        }
    720721};
    721722
     723class SRIgnoreIncomplete: public SRBoolSetting
     724{
     725    public:
     726        SRIgnoreIncomplete(ScheduledRecording *_parent, ManagedListGroup* _group, ManagedList* _list)
     727                    : SRBoolSetting(_parent, QObject::tr("Ignore generic episodes"),
     728                                     QObject::tr("Record generic episodes"),
     729                                    "ignoreIncompleteItem", "ignoreincomplete", _group, _list )
     730        {
     731            _parent->setIgnoreIncompleteObj(this);
     732        }
     733};
     734
    722735class SRInactive: public SRBoolSetting
    723736{
    724737    public:
  • libs/libmythtv/scheduledrecording.cpp

     
    5858    dupin = NULL;
    5959    dupmethod = NULL;
    6060    autoexpire = NULL;
     61    ignoreincomplete = NULL;
    6162    autotranscode = NULL;
    6263    transcoder = NULL;
    6364    autocommflag = NULL;
     
    426427    autoexpire->setValue(expire);
    427428}
    428429
     430int ScheduledRecording::GetIgnoreIncomplete(void) const {
     431    return(ignoreincomplete->getValue().toInt());
     432}
     433
     434void ScheduledRecording::SetIgnoreIncomplete(int expire) {
     435    ignoreincomplete->setValue(expire);
     436}
     437
    429438int ScheduledRecording::GetTranscoder(void) const {
    430439    return transcoder->getValue().toInt();
    431440}
     
    855864    recpriority->setValue(0);
    856865   
    857866    autoexpire->setValue(gContext->GetNumSetting("AutoExpireDefault", 0));
     867    ignoreincomplete->setValue(gContext->GetNumSetting("IgnoreIncompleteDefault", 0));
    858868
    859869    autotranscode->setValue(gContext->GetNumSetting("AutoTranscode", 0));
    860870    transcoder->fillSelections();
     
    944954    dupin->setChanged();
    945955    dupmethod->setChanged();
    946956    autoexpire->setChanged();
     957    ignoreincomplete->setChanged();
    947958    autotranscode->setChanged();
    948959    autocommflag->setChanged();
    949960    autouserjob1->setChanged();
  • programs/mythbackend/scheduler.cpp

     
    27502750"program.videoprop+0, program.subtitletypes+0, program.audioprop+0, "
    27512751"RECTABLE.storagegroup, capturecard.hostname, recordmatch.oldrecstatus, " +
    27522752    pwrpri + QString(
     2753", RECTABLE.ignoreincomplete "
    27532754"FROM recordmatch "
    27542755" INNER JOIN RECTABLE ON (recordmatch.recordid = RECTABLE.recordid) "
    27552756" INNER JOIN program ON (recordmatch.chanid = program.chanid AND "
     
    29222923            if ((p->dupin & kDupsNewEpi) && p->repeat)
    29232924                p->recstatus = rsRepeat;
    29242925
     2926             
     2927            // If we want to ignore episodes in series with bogus data.
     2928            // Unfortunately the 'generic' flag doesn't work very well, since
     2929            // since it is not set if there is a generic description. More fundamentally,
     2930            // you need to know which of subtitle and/or description are expected before
     2931            // you can determine if a program entry is generic. In this test
     2932            // if you match on subtitle AND desctiption, BOTH must be set or it's
     2933            // treated as generic.
     2934            QRegExp exp(".*0000");
     2935            QString series("series");
     2936
     2937            if (result.value(46).toInt() && p->category.compare(series) && p->programid.contains(exp)) {
     2938              if( (p->dupmethod & 0x2 && p->subtitle.isEmpty()) ||
     2939                  (p->dupmethod & 0x4 && p->description.isEmpty()) )
     2940                p->recstatus = rsRepeat;
     2941            }
     2942
    29252943            if ((p->dupin & kDupsInOldRecorded) && result.value(10).toInt())
    29262944            {
    29272945                if (result.value(44).toInt() == rsNeverRecord)
     
    29292947                else
    29302948                    p->recstatus = rsPreviousRecording;
    29312949            }
     2950
     2951            /* finddulicate */
    29322952            if ((p->dupin & kDupsInRecorded) && result.value(14).toInt())
    29332953                p->recstatus = rsCurrentRecording;
    29342954        }