Ticket #494: eitcrawl-lowerdb-load.2.diff

File eitcrawl-lowerdb-load.2.diff, 2.3 KB (added by Stuart Auchterlonie, 14 years ago)

Updated patch to only reschedule on channel change

  • libs/libmythtv/eithelper.cpp

    old new  
    33// MythTV includes
    44#include "eithelper.h"
    55#include "mythdbcon.h"
    6 #include "scheduledrecording.h"
    76
    87const uint EITHelper::kChunkSize = 20;
    98
     
    120119
    121120    if (counter > 0)
    122121    {
    123         VERBOSE(VB_SCHEDULE,
    124                 QString("EITHelper: Added %1 scheduler events, running "
    125                         "scheduler to check for updates").arg(counter));
    126         ScheduledRecording::signalChange(-1);
    127         QString msg = QString("Added %1 scheduler events").arg(counter);
    128         gContext->LogEntry("DVB/ATSC Guide Scanner", LP_INFO, msg, "");
     122        VERBOSE(VB_SCHEDULE, QString("EITHelper: Added %1 events in this pass")
     123                .arg(counter));
    129124    }
    130125}
    131126
  • libs/libmythtv/eitscanner.cpp

    old new  
    1111
    1212#include "eitscanner.h"
    1313#include "eithelper.h"
     14#include "scheduledrecording.h"
    1415
    1516/** \class EITScanner
    1617 *  \brief Acts as glue between DVBChannel, DVBSIParser, and EITHelper.
     
    8788
    8889        if (activeScan && (QDateTime::currentDateTime() > activeScanNextTrig))
    8990        {
     91            VERBOSE(VB_SCHEDULE,
     92                QString("EITHelper: running scheduler to check for updates"));
     93            ScheduledRecording::signalChange(-1);
     94
    9095            if (activeScanNextChan == activeScanChannels.end())
    9196                activeScanNextChan = activeScanChannels.begin();
    9297 
     
    98103            activeScanNextChan++;
    99104        }
    100105
    101         exitThreadCond.wait(200); // sleep up to 200 ms.
     106        exitThreadCond.wait(1000); // sleep up to 1s.
    102107    }
    103108}
    104109
     
    127132
    128133    channel = NULL;
    129134    parser  = NULL;
     135
     136    VERBOSE(VB_SCHEDULE,
     137        QString("EITHelper: running scheduler to check for updates"));
     138    ScheduledRecording::signalChange(-1);
    130139}
    131140
    132141void EITScanner::StartActiveScan(TVRec *_rec, uint max_seconds_per_source)