Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
- index 1a35c1f..7e3e8dc 100644
- --- a/mythtv/libs/libmythtv/recordinginfo.cpp
- +++ b/mythtv/libs/libmythtv/recordinginfo.cpp
- @@ -104,7 +104,8 @@ RecordingInfo::RecordingInfo(
- uint _videoproperties,
- uint _audioproperties,
- bool _future,
- - int _schedorder) :
- + int _schedorder,
- + uint _mplexid) :
- ProgramInfo(
- _title, _subtitle, _description, _season, _episode,
- _category, _chanid, _chanstr, _chansign, _channame,
- @@ -115,6 +116,7 @@ RecordingInfo::RecordingInfo(
- savedrecstatus(rsUnknown),
- future(_future),
- schedorder(_schedorder),
- + mplexid(_mplexid),
- desiredrecstartts(_startts),
- desiredrecendts(_endts),
- record(NULL)
- @@ -214,6 +216,7 @@ RecordingInfo::RecordingInfo(
- savedrecstatus(rsUnknown),
- future(false),
- schedorder(0),
- + mplexid(0),
- desiredrecstartts(_startts),
- desiredrecendts(_endts),
- record(NULL)
- @@ -248,6 +251,7 @@ RecordingInfo::RecordingInfo(
- savedrecstatus(rsUnknown),
- future(false),
- schedorder(0),
- + mplexid(0),
- desiredrecstartts(),
- desiredrecendts(),
- record(NULL)
- @@ -399,6 +403,7 @@ void RecordingInfo::clone(const RecordingInfo &other,
- savedrecstatus = other.savedrecstatus;
- future = other.future;
- schedorder = other.schedorder;
- + mplexid = other.mplexid;
- desiredrecstartts = other.desiredrecstartts;
- desiredrecendts = other.desiredrecendts;
- }
- @@ -426,6 +431,7 @@ void RecordingInfo::clone(const ProgramInfo &other,
- savedrecstatus = rsUnknown;
- future = false;
- schedorder = 0;
- + mplexid = 0;
- desiredrecstartts = QDateTime();
- desiredrecendts = QDateTime();
- }
- @@ -441,6 +447,7 @@ void RecordingInfo::clear(void)
- savedrecstatus = rsUnknown;
- future = false;
- schedorder = 0;
- + mplexid = 0;
- desiredrecstartts = QDateTime();
- desiredrecendts = QDateTime();
- }
- diff --git a/mythtv/libs/libmythtv/recordinginfo.h b/mythtv/libs/libmythtv/recordinginfo.h
- index 672bd2e..0e20a75 100644
- --- a/mythtv/libs/libmythtv/recordinginfo.h
- +++ b/mythtv/libs/libmythtv/recordinginfo.h
- @@ -37,6 +37,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- savedrecstatus(rsUnknown),
- future(false),
- schedorder(0),
- + mplexid(0),
- desiredrecstartts(),
- desiredrecendts(),
- record(NULL) {}
- @@ -46,6 +47,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- savedrecstatus(other.savedrecstatus),
- future(other.future),
- schedorder(other.schedorder),
- + mplexid(other.mplexid),
- desiredrecstartts(other.desiredrecstartts),
- desiredrecendts(other.desiredrecendts),
- record(NULL) {}
- @@ -55,6 +57,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- savedrecstatus(rsUnknown),
- future(false),
- schedorder(0),
- + mplexid(0),
- desiredrecstartts(startts),
- desiredrecendts(endts),
- record(NULL) {}
- @@ -64,6 +67,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- savedrecstatus(rsUnknown),
- future(false),
- schedorder(0),
- + mplexid(0),
- desiredrecstartts(startts),
- desiredrecendts(endts),
- record(NULL) {}
- @@ -74,6 +78,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- savedrecstatus(rsUnknown),
- future(false),
- schedorder(0),
- + mplexid(0),
- desiredrecstartts(startts),
- desiredrecendts(endts),
- record(NULL) {}
- @@ -140,7 +145,8 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- uint videoproperties,
- uint audioproperties,
- bool future,
- - int schedorder);
- + int schedorder,
- + uint mplexid);
- /// Create RecordingInfo from 'record'+'channel' tables,
- /// user in scheduler.cpp @ ~ 3566 & ~ 3643
- @@ -260,6 +266,7 @@ class MTV_PUBLIC RecordingInfo : public ProgramInfo
- RecStatusType savedrecstatus;
- bool future;
- int schedorder;
- + uint mplexid; // Only valid within the scheduler
- QDateTime desiredrecstartts;
- QDateTime desiredrecendts;
- diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
- index eed332a..68edb02 100644
- --- a/mythtv/programs/mythbackend/scheduler.cpp
- +++ b/mythtv/programs/mythbackend/scheduler.cpp
- @@ -841,6 +841,7 @@ void Scheduler::SlaveConnected(RecordingList &slavelist)
- if (sp->GetInputID() && !found)
- {
- + sp->mplexid = sp->QueryMplexID();
- reclist.push_back(new RecordingInfo(*sp));
- reclist_changed = true;
- sp->AddHistory(false);
- @@ -1060,15 +1061,14 @@ bool Scheduler::FindNextConflict(
- .arg(p->GetCardID()).arg(q->GetCardID())
- .arg(igrp.GetSharedInputGroup(
- p->GetInputID(), q->GetInputID()))
- - .arg(p->QueryMplexID()).arg(q->QueryMplexID()));
- + .arg(p->mplexid).arg(q->mplexid));
- }
- // if two inputs are in the same input group we have a conflict
- // unless the programs are on the same multiplex.
- if (p->GetCardID() != q->GetCardID())
- {
- - uint p_mplexid = p->QueryMplexID();
- - if (p_mplexid && (p_mplexid == q->QueryMplexID()))
- + if (p->mplexid && (p->mplexid == q->mplexid))
- continue;
- }
- @@ -1673,6 +1673,7 @@ void Scheduler::AddRecording(const RecordingInfo &pi)
- QString("Adding '%1' to reclist.").arg(pi.GetTitle()));
- RecordingInfo * new_pi = new RecordingInfo(pi);
- + new_pi->mplexid = new_pi->QueryMplexID();
- reclist.push_back(new_pi);
- reclist_changed = true;
- @@ -4001,7 +4002,8 @@ void Scheduler::AddNewRecords(void)
- " p.subtitletypes+0, p.audioprop+0, RECTABLE.storagegroup, "//40-42
- " capturecard.hostname, recordmatch.oldrecstatus, NULL, "//43-45
- " oldrecstatus.future, cardinput.schedorder, " //46-47
- - " p.syndicatedepisodenumber, p.partnumber, p.parttotal, ") + //48-50
- + " p.syndicatedepisodenumber, p.partnumber, p.parttotal, " //48-50
- + " c.mplexid, ") + //51
- pwrpri + QString(
- "FROM recordmatch "
- "INNER JOIN RECTABLE ON (recordmatch.recordid = RECTABLE.recordid) "
- @@ -4060,6 +4062,10 @@ void Scheduler::AddNewRecords(void)
- && callsign == lastp->GetChannelSchedulingID())
- continue;
- + uint mplexid = result.value(51).toUInt();
- + if (mplexid == 32767)
- + mplexid = 0;
- +
- RecordingInfo *p = new RecordingInfo(
- title,
- result.value(5).toString(),//subtitle
- @@ -4123,7 +4129,8 @@ void Scheduler::AddNewRecords(void)
- result.value(39).toUInt(),//videoproperties
- result.value(41).toUInt(),//audioproperties
- result.value(46).toInt(),//future
- - result.value(47).toInt());//schedorder
- + result.value(47).toInt(),//schedorder
- + mplexid); //mplexid
- if (!p->future && !p->IsReactivated() &&
- p->oldrecstatus != rsAborted &&
- @@ -4132,7 +4139,7 @@ void Scheduler::AddNewRecords(void)
- p->SetRecordingStatus(p->oldrecstatus);
- }
- - p->SetRecordingPriority2(result.value(51).toInt());
- + p->SetRecordingPriority2(result.value(52).toInt());
- // Check to see if the program is currently recording and if
- // the end time was changed. Ideally, checking for a new end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement