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

File 0001-Ignore-channels-without-xmltvid-when-guessing-if-the.patch, 2.7 KB (added by dekarl@…, 13 years ago)
  • mythtv/programs/mythfilldatabase/filldata.cpp

    From db52a329f5077c8c1e4956fb8e379b0177b0369f 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] 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 99cfcca..bbaa89b 100644
    a b int main(int argc, char *argv[]) 
    307307
    308308        query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
    309309                      "ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
    310                       "AND manualid = 0;");
     310                      "AND manualid = 0 AND c.xmltvid != '';");
    311311        query.bindValue(":SRCID", fromfile_id);
    312312
    313313        if (query.exec() && query.next())
    int main(int argc, char *argv[]) 
    327327
    328328        query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
    329329                      "ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
    330                       "AND manualid = 0;");
     330                      "AND manualid = 0 AND c.xmltvid != '';");
    331331        query.bindValue(":SRCID", fromfile_id);
    332332
    333333        if (query.exec() && query.next())