Ticket #2207: mythfilldb-externally_handled.diff
File mythfilldb-externally_handled.diff, 2.1 KB (added by , 18 years ago) |
---|
-
programs/mythfilldatabase/filldata.cpp
2823 2823 MSqlQuery query(MSqlQuery::InitCon()); 2824 2824 QDateTime GuideDataBefore, GuideDataAfter; 2825 2825 int failures = 0; 2826 int externally_handled = 0; 2827 int total_sources = sourcelist.size(); 2826 2828 2827 2829 query.exec(QString("SELECT MAX(endtime) FROM program WHERE manualid=0;")); 2828 2830 if (query.isActive() && query.size() > 0) … … 3101 3103 { 3102 3104 VERBOSE(VB_IMPORTANT, "Source configured to use only the " 3103 3105 "broadcasted guide data. Skipping."); 3106 externally_handled++; 3107 query.exec(QString("UPDATE settings SET data ='%1' " 3108 "WHERE value='mythfilldatabaseLastRunStart' OR " 3109 "value = 'mythfilldatabaseLastRunEnd'") 3110 .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm"))); 3104 3111 } 3105 3112 else if (xmltv_grabber == "/bin/true" || 3106 3113 xmltv_grabber == "none" || … … 3108 3115 { 3109 3116 VERBOSE(VB_IMPORTANT, 3110 3117 "Source configured with no grabber. Nothing to do."); 3118 externally_handled++; 3119 query.exec(QString("UPDATE settings SET data ='%1' " 3120 "WHERE value='mythfilldatabaseLastRunStart' OR " 3121 "value = 'mythfilldatabaseLastRunEnd'") 3122 .arg(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm"))); 3111 3123 } 3112 3124 else 3113 3125 { … … 3137 3149 3138 3150 if (failures == 0) 3139 3151 { 3140 if (GuideDataAfter == GuideDataBefore) 3152 if ((GuideDataAfter == GuideDataBefore) && 3153 (total_sources != externally_handled)) 3141 3154 status = "mythfilldatabase ran, but did not insert " 3142 3155 "any new data into the Guide. This can indicate a " 3143 3156 "potential grabber failure.";