Ticket #9990: 0001-Ignore-channels-without-xmltvid-when-guessing-if-the.2.patch

File 0001-Ignore-channels-without-xmltvid-when-guessing-if-the.2.patch, 2.7 KB (added by dekarl@…, 12 years ago)

the patch, rebased against lastest master

  • mythtv/programs/mythfilldatabase/filldata.cpp

    From 0479416bc8de3eeffc4251d5b9f55926e0b213c2 Mon Sep 17 00:00:00 2001
    From: Karl Dietz <dekarl@users.sourceforge.net>
    Date: Wed, 17 Aug 2011 08:18:53 +0200
    Subject: [PATCH 1/5] Ignore channels without xmltvid when guessing if the xmltv grabber has done something.
    
    Filling the database from xmltv is unlikely to influence channels without
    xmltvid, so ignore them when guessing if something has changed. Might be
    even better to just look at the count of changed programs.
    ---
     mythtv/programs/mythfilldatabase/filldata.cpp |    4 ++--
     mythtv/programs/mythfilldatabase/main.cpp     |    4 ++--
     2 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/mythtv/programs/mythfilldatabase/filldata.cpp b/mythtv/programs/mythfilldatabase/filldata.cpp
    index 1058670..8f4c886 100644
    a b bool FillData::Run(SourceList &sourcelist) 
    552552
    553553        query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
    554554                      "ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
    555                       "AND manualid = 0;");
     555                      "AND manualid = 0 AND c.xmltvid != '';");
    556556        query.bindValue(":SRCID", (*it).id);
    557557
    558558        if (query.exec() && query.size() > 0)
    bool FillData::Run(SourceList &sourcelist) 
    962962
    963963        query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
    964964                      "ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
    965                       "AND manualid = 0;");
     965                      "AND manualid = 0 AND c.xmltvid != '';");
    966966        query.bindValue(":SRCID", (*it).id);
    967967
    968968        if (query.exec() && query.size() > 0)
  • mythtv/programs/mythfilldatabase/main.cpp

    diff --git a/mythtv/programs/mythfilldatabase/main.cpp b/mythtv/programs/mythfilldatabase/main.cpp
    index 6e8ab8e..514c947 100644
    a b int main(int argc, char *argv[]) 
    376376
    377377        query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
    378378                      "ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
    379                       "AND manualid = 0;");
     379                      "AND manualid = 0 AND c.xmltvid != '';");
    380380        query.bindValue(":SRCID", fromfile_id);
    381381
    382382        if (query.exec() && query.next())
    int main(int argc, char *argv[]) 
    396396
    397397        query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
    398398                      "ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
    399                       "AND manualid = 0;");
     399                      "AND manualid = 0 AND c.xmltvid != '';");
    400400        query.bindValue(":SRCID", fromfile_id);
    401401
    402402        if (query.exec() && query.next())