Ticket #1657: ignoreincomplete.2.patch

File ignoreincomplete.2.patch, 5.8 KB (added by ajlill@…, 14 years ago)

Updated patch to 0.20

  • libs/libmythtv/sr_items.cpp

     
    3131    prefInput = new SRInput(_rec, _parentList, this);
    3232    addItem(prefInput->getItem(), -1);
    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;
     
    7778    int GetAutoExpire(void) const;
    7879    void SetAutoExpire(int expire);
    7980
     81    int GetIgnoreIncomplete(void) const;
     82    void SetIgnoreIncomplete(int expire);
     83
    8084    int GetMaxEpisodes(void) const;
    8185    bool GetMaxNewest(void) const;
    8286
     
    145149    void setAutoUserJob3Obj(SRAutoUserJob3* val) {autouserjob3 = val;}
    146150    void setAutoUserJob4Obj(SRAutoUserJob4* val) {autouserjob4 = val;}
    147151    void setAutoExpireObj(SRAutoExpire* val) {autoexpire = val;}
     152    void setIgnoreIncompleteObj(SRIgnoreIncomplete* val) {ignoreincomplete = val;}
    148153    void setStartOffsetObj(SRStartOffset* val) {startoffset = val;}
    149154    void setEndOffsetObj(SREndOffset* val) {endoffset = val;}
    150155    void setMaxEpisodesObj(SRMaxEpisodes* val) {maxepisodes = val;}
     
    215220    class SRAutoUserJob3* autouserjob3;
    216221    class SRAutoUserJob4* autouserjob4;
    217222    class SRAutoExpire* autoexpire;
     223    class SRIgnoreIncomplete* ignoreincomplete;
    218224    class SRStartOffset* startoffset;
    219225    class SREndOffset* endoffset;
    220226    class SRMaxEpisodes* maxepisodes;
  • libs/libmythtv/sr_items.h

     
    385385        class SRDupIn* dupLocItem;
    386386        class SRInput* prefInput;
    387387        class SRInactive* inactive;
     388        class SRIgnoreIncomplete* ignoreIncomplete;
    388389
    389390        ScheduledRecording *schedRec;
    390391};
     
    737738        }
    738739};
    739740
     741class SRIgnoreIncomplete: public SRBoolSetting
     742{
     743    public:
     744        SRIgnoreIncomplete(ScheduledRecording *_parent, ManagedListGroup* _group, ManagedList* _list)
     745                    : SRBoolSetting(_parent, QObject::tr("Ignore generic episodes"),
     746                                     QObject::tr("Record generic episodes"),
     747                                    "ignoreIncompleteItem", "ignoreincomplete", _group, _list )
     748        {
     749            _parent->setIgnoreIncompleteObj(this);
     750        }
     751};
     752
    740753class SRInactive: public SRBoolSetting
    741754{
    742755    public:
  • libs/libmythtv/scheduledrecording.cpp

     
    3030    dupin = NULL;
    3131    dupmethod = NULL;
    3232    autoexpire = NULL;
     33    ignoreincomplete = NULL;
    3334    autotranscode = NULL;
    3435    transcoder = NULL;
    3536    autocommflag = NULL;
     
    400401    autoexpire->setValue(expire);
    401402}
    402403
     404int ScheduledRecording::GetIgnoreIncomplete(void) const {
     405    return(ignoreincomplete->getValue().toInt());
     406}
     407
     408void ScheduledRecording::SetIgnoreIncomplete(int expire) {
     409    ignoreincomplete->setValue(expire);
     410}
     411
    403412int ScheduledRecording::GetTranscoder(void) const {
    404413    return transcoder->getValue().toInt();
    405414}
     
    796805    recpriority->setValue(0);
    797806   
    798807    autoexpire->setValue(gContext->GetNumSetting("AutoExpireDefault", 0));
     808    ignoreincomplete->setValue(gContext->GetNumSetting("IgnoreIncompleteDefault", 0));
    799809
    800810    autotranscode->setValue(gContext->GetNumSetting("AutoTranscode", 0));
    801811    transcoder->fillSelections();
     
    883893    dupin->setChanged();
    884894    dupmethod->setChanged();
    885895    autoexpire->setChanged();
     896    ignoreincomplete->setChanged();
    886897    autotranscode->setChanged();
    887898    autocommflag->setChanged();
    888899    autouserjob1->setChanged();
  • programs/mythbackend/scheduler.cpp

    (this hunk was shorter than expected) 
    20502050"oldrecstatus.recstatus, oldrecstatus.reactivate, "
    20512051"channel.recpriority + cardinput.recpriority, "
    20522052"RECTABLE.prefinput, program.hdtv, program.closecaptioned, "
    2053 "program.first, program.last, program.stereo "
     2053"program.first, program.last, program.stereo, "
     2054"RECTABLE.ignoreincomplete "
    20542055+ QString(
    20552056"FROM recordmatch "
    20562057
     
    22922293                 !p->reactivate &&
    22932294                 !(p->dupmethod & kDupCheckNone))
    22942295        {
    2295             if (p->dupin == kDupsNewEpi && p->repeat)
     2296          QRegExp exp(".*0000");
     2297          QString series("series");
     2298
     2299             if (p->dupin == kDupsNewEpi && p->repeat)
    22962300                p->recstatus = rsRepeat;
     2301             
     2302             // If we want to ignore episodes in series with bogus data.
     2303             // Unfortunately the 'generic' flag doesn't seem to work,
     2304             // perhaps because of generic descriptions
     2305            if (result.value(46).toInt() && p->category.compare(series) && p->programid.contains(exp)) {
     2306              if( (p->dupmethod & 0x2 && p->subtitle.isEmpty()) ||
     2307                  (p->dupmethod & 0x4 && p->description.isEmpty()) )
     2308                p->recstatus = rsRepeat;
     2309            }
    22972310
     2311            /* findduplicate */
    22982312            if (((p->dupin & kDupsInOldRecorded) || (p->dupin == kDupsNewEpi)) &&
    22992313                result.value(10).toInt())
    23002314                p->recstatus = rsPreviousRecording;