Ticket #11224: 11224-debug2.patch
File 11224-debug2.patch, 3.3 KB (added by , 11 years ago) |
---|
-
mythtv/programs/mythbackend/scheduler.cpp
diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp index d6676b3..d7e0879 100644
a b using namespace std; 53 53 54 54 bool debugConflicts = false; 55 55 56 static void DumpRecordMatch(const QString when) 57 { 58 LOG(VB_GENERAL, LOG_INFO, QString("Dumping recordmatch %1").arg(when)); 59 MSqlQuery query(MSqlQuery::InitCon()); 60 query.exec("SELECT recordid, chanid, starttime, manualid, " 61 " oldrecduplicate, recduplicate, findduplicate, " 62 " oldrecstatus, findid " 63 "FROM recordmatch " 64 //"WHERE recordid = <myrecordid> " 65 "WHERE recordid = 1 " 66 "ORDER BY starttime, chanid " 67 ); 68 while (query.next()) 69 { 70 LOG(VB_GENERAL, LOG_INFO, QString("rid=%1, chid=%2, st=%3, mid=%4, " 71 "ord=%5, rd=%6, fd=%7, ors=%8, " 72 "fid=%9") 73 .arg(query.value(0).toInt()) 74 .arg(query.value(1).toInt()) 75 .arg(query.value(2).toDateTime().toLocalTime().toString()) 76 .arg(query.value(3).toInt()) 77 .arg(query.value(4).toInt()) 78 .arg(query.value(5).toInt()) 79 .arg(query.value(6).toInt()) 80 .arg(query.value(7).toInt()) 81 .arg(query.value(8).toInt())); 82 } 83 } 84 56 85 Scheduler::Scheduler(bool runthread, QMap<int, EncoderLink *> *tvList, 57 86 QString tmptable, Scheduler *master_sched) : 58 87 MThread("Scheduler"), … … void Scheduler::ResetDuplicates(uint recordid, uint findid, 2041 2070 if (!subtitle.isEmpty()) 2042 2071 { 2043 2072 // Need to check both for kDupCheckSubThenDesc 2044 filterClause += "OR p.subtitle = :SUBTITLE " 2045 "OR p.description = :SUBTITLE "; 2046 bindings[":SUBTITLE"] = subtitle; 2073 filterClause += "OR p.subtitle = :SUBTITLE1 " 2074 "OR p.description = :SUBTITLE2 "; 2075 bindings[":SUBTITLE1"] = subtitle; 2076 bindings[":SUBTITLE2"] = subtitle; 2047 2077 } 2048 2078 if (!descrip.isEmpty()) 2049 2079 { 2050 2080 // Need to check both for kDupCheckSubThenDesc 2051 filterClause += "OR p.description = :DESCRIP " 2052 "OR p.subtitle = :DESCRIP "; 2053 bindings[":DESCRIP"] = descrip; 2081 filterClause += "OR p.description = :DESCRIP1 " 2082 "OR p.subtitle = :DESCRIP2 "; 2083 bindings[":DESCRIP1"] = descrip; 2084 bindings[":DESCRIP2"] = descrip; 2054 2085 } 2055 2086 if (!programid.isEmpty()) 2056 2087 { … … bool Scheduler::HandleReschedule(void) 2107 2138 QString msg; 2108 2139 bool deleteFuture = false; 2109 2140 bool runCheck = false; 2141 2142 DumpRecordMatch("Before ResetDuplicates()"); 2110 2143 2111 2144 while (HaveQueuedRequests()) 2112 2145 { … … bool Scheduler::HandleReschedule(void) 2206 2239 if (runCheck) 2207 2240 { 2208 2241 LOG(VB_SCHEDULE, LOG_INFO, "UpdateDuplicates..."); 2242 DumpRecordMatch("Before UpdateDuplicates()"); 2209 2243 UpdateDuplicates(); 2244 DumpRecordMatch("After UpdateDuplicates()"); 2210 2245 } 2211 2246 gettimeofday(&fillend, NULL); 2212 2247 checkTime = ((fillend.tv_sec - fillstart.tv_sec ) * 1000000 +