Ticket #1772: ajm_scheduler.patch

File ajm_scheduler.patch, 5.5 KB (added by Aaron McCarthy <mccarthy.aaron@…>, 14 years ago)
  • programs/mythbackend/scheduler.cpp

    old new  
    416416         << p->chanstr.rightJustify(4, ' ') << " " << p->chanid
    417417         << p->recstartts.toString("  dd hh:mm-").local8Bit()
    418418         << p->recendts.toString("hh:mm  ").local8Bit()
    419          << p->cardid << " " << p->inputid << "  "
     419         << p->cardid << " " << p->inputid << " " << p->mplexid << "  "
    420420         << p->RecTypeChar() << " " << p->RecStatusChar() << " "
    421421         << (QString::number(p->recpriority) + "/" +
    422422             QString::number(p->recpriority2)).rightJustify(5, ' ')
     
    680680            continue;
    681681        if (p->recendts <= q->recstartts || p->recstartts >= q->recendts)
    682682            continue;
     683        if (p->inputid == q->inputid && p->mplexid == q->mplexid)   // if mplex ids are the same don't conflict
     684            continue;
    683685        if (p->inputid == q->inputid && p->shareable)
    684686            continue;
    685687
     
    20192021"program.airdate, program.stars, program.originalairdate, RECTABLE.inactive, "
    20202022"RECTABLE.parentid, ") + progfindid + ", RECTABLE.playgroup, "
    20212023"oldrecstatus.recstatus, oldrecstatus.reactivate, "
    2022 "channel.recpriority + cardinput.recpriority, program.hdtv "
     2024"channel.recpriority + cardinput.recpriority, program.hdtv, "
     2025"channel.mplexid "
    20232026+ QString(
    20242027"FROM recordmatch "
    20252028
     
    21572160        p->chancommfree = result.value(23).toInt();
    21582161        p->cardid = result.value(24).toInt();
    21592162        p->inputid = result.value(25).toInt();
     2163        p->mplexid = result.value(41).toInt();
    21602164        p->shareable = result.value(26).toInt();
    21612165        p->seriesid = result.value(27).toString();
    21622166        p->programid = result.value(28).toString();
     
    22762280"RECTABLE.starttime, RECTABLE.startdate, RECTABLE.endtime, RECTABLE.enddate, "
    22772281"RECTABLE.startoffset, RECTABLE.endoffset, "
    22782282"RECTABLE.title, RECTABLE.subtitle, RECTABLE.description, "
    2279 "channel.channum, channel.callsign, channel.name "
     2283"channel.channum, channel.callsign, channel.name, channel.mplexid "
    22802284"FROM RECTABLE "
    22812285" INNER JOIN channel ON (channel.chanid = RECTABLE.chanid) "
    22822286" LEFT JOIN recordmatch on RECTABLE.recordid = recordmatch.recordid "
     
    23472351        p->chanstr = result.value(12).toString();
    23482352        p->chansign = QString::fromUtf8(result.value(13).toString());
    23492353        p->channame = QString::fromUtf8(result.value(14).toString());
     2354        p->mplexid = result.value(15).toInt();
    23502355
    23512356        p->schedulerid = p->startts.toString() + "_" + p->chanid;
    23522357
     
    23702375"channel.name, RECTABLE.recordid, RECTABLE.recgroup, RECTABLE.dupin, "
    23712376"RECTABLE.dupmethod, channel.commfree, channel.channum, RECTABLE.station, "
    23722377"RECTABLE.seriesid, RECTABLE.programid, RECTABLE.category, RECTABLE.findid, "
    2373 "RECTABLE.playgroup "
     2378"RECTABLE.playgroup, channel.mplexid "
    23742379"FROM RECTABLE "
    23752380"LEFT JOIN channel ON channel.callsign = RECTABLE.station "
    23762381"GROUP BY recordid "
     
    24462451            proginfo->programid = result.value(19).toString();
    24472452            proginfo->category = result.value(20).toString();
    24482453            proginfo->findid = result.value(21).toInt();
     2454            proginfo->mplexid = result.value(23).toInt();
    24492455           
    24502456            proginfo->recstartts = proginfo->startts;
    24512457            proginfo->recendts = proginfo->endts;
  • libs/libmythtv/programinfo.cpp

    old new  
    104104    sourceid = 0;
    105105    inputid = 0;
    106106    cardid = 0;
     107    mplexid = 0;
    107108    shareable = false;
    108109    duplicate = false;
    109110    schedulerid = "";
     
    195196    sourceid = other.sourceid;
    196197    inputid = other.inputid;
    197198    cardid = other.cardid;
     199    mplexid = other.mplexid;
    198200    shareable = other.shareable;
    199201    duplicate = other.duplicate;
    200202    schedulerid = QDeepCopy<QString>(other.schedulerid);
     
    283285    STR_TO_LIST(hostname)
    284286    INT_TO_LIST(sourceid)
    285287    INT_TO_LIST(cardid)
     288    INT_TO_LIST(mplexid)
    286289    INT_TO_LIST(inputid)
    287290    INT_TO_LIST(recpriority)
    288291    INT_TO_LIST(recstatus)
     
    381384    STR_FROM_LIST(hostname)
    382385    INT_FROM_LIST(sourceid)
    383386    INT_FROM_LIST(cardid)
     387    INT_FROM_LIST(mplexid)
    384388    INT_FROM_LIST(inputid)
    385389    INT_FROM_LIST(recpriority)
    386390    ENUM_FROM_LIST(recstatus, RecStatusType)
     
    29842988        recstartts = found->recstartts;
    29852989        recendts = found->recendts;
    29862990        cardid = found->cardid;
     2991        mplexid = found->mplexid;
    29872992        inputid = found->inputid;
    29882993    }
    29892994    return found;
     
    40854090                p->recstartts = s->recstartts;
    40864091                p->recendts = s->recendts;
    40874092                p->cardid = s->cardid;
     4093                p->mplexid = s->mplexid;
    40884094                p->inputid = s->inputid;
    40894095                p->dupin = s->dupin;
    40904096                p->dupmethod = s->dupmethod;
  • libs/libmythtv/programinfo.h

    old new  
    300300    int sourceid;
    301301    int inputid;
    302302    int cardid;
     303    int mplexid;
    303304    bool shareable;
    304305    bool duplicate;
    305306