Esempio n. 1
0
static QDateTime get_start(const RecordingInfo &ri)
{
    if (ri.GetDesiredStartTime().isValid())
    {
        return (ri.GetScheduledStartTime() > ri.GetDesiredStartTime()) ?
            ri.GetScheduledStartTime() : ri.GetDesiredStartTime();
    }
    else
    {
        return ri.GetScheduledStartTime();
    }
}
Esempio n. 2
0
/// \brief Copies important fields from other RecordingInfo.
void RecordingInfo::clone(const RecordingInfo &other,
                          bool ignore_non_serialized_data)
{
    bool is_same =
        (chanid && recstartts.isValid() && startts.isValid() &&
         chanid     == other.GetChanID() &&
         recstartts == other.GetRecordingStartTime() &&
         startts    == other.GetScheduledStartTime());

    ProgramInfo::clone(other, ignore_non_serialized_data);

    if (!is_same)
    {
        delete record;
        record = NULL;
    }

    if (!ignore_non_serialized_data)
    {
        oldrecstatus   = other.oldrecstatus;
        savedrecstatus = other.savedrecstatus;
        future         = other.future;
        schedorder     = other.schedorder;
        mplexid        = other.mplexid;
        desiredrecstartts = other.desiredrecstartts;
        desiredrecendts = other.desiredrecendts;
    }
}