Ticket #2285: 2285-dbg.patch
File 2285-dbg.patch, 5.5 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/remoteutil.cpp
181 181 RemoteGetRecordingList(&expiringlist, strList); 182 182 } 183 183 184 int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, QStringList &strList) 184 int RemoteGetRecordingList(vector<ProgramInfo *> *reclist, 185 QStringList &strList) 185 186 { 187 VERBOSE(VB_IMPORTANT, "RemoteGetRecordingList(..." 188 <<strList[0]<<") -- begin"); 186 189 if (!gContext->SendReceiveStringList(strList)) 190 { 191 VERBOSE(VB_IMPORTANT, "RemoteGetRecordingList(..." 192 <<strList[0]<<") -- end 0"); 187 193 return 0; 194 } 188 195 189 196 int numrecordings = strList[0].toInt(); 190 197 … … 205 212 } 206 213 } 207 214 215 VERBOSE(VB_IMPORTANT, "RemoteGetRecordingList(..." 216 <<strList[0]<<") -- end "<<numrecordings); 217 208 218 return numrecordings; 209 219 } 210 220 -
programs/mythfrontend/playbackbox.cpp
1431 1431 1432 1432 bool PlaybackBox::FillList(bool useCachedData) 1433 1433 { 1434 VERBOSE(VB_IMPORTANT, "FillList(" 1435 <<(useCachedData?"use":"no")<<" cache) -- begin"); 1436 1434 1437 ProgramInfo *p; 1435 1438 1436 1439 // Save some information so we can find our place again. … … 1469 1472 // objects with the title lists. 1470 1473 progLists[""].setAutoDelete(false); 1471 1474 1475 VERBOSE(VB_IMPORTANT, "FillList() 1"); 1472 1476 fillRecGroupPasswordCache(); 1473 1477 1474 1478 ViewTitleSort titleSort = (ViewTitleSort)gContext->GetNumSetting( … … 1481 1485 1482 1486 bool LiveTVInAllPrograms = gContext->GetNumSetting("LiveTVInAllPrograms",0); 1483 1487 1488 VERBOSE(VB_IMPORTANT, "FillList() 2"); 1484 1489 if (!useCachedData || !progCache || progCache->empty()) 1485 1490 { 1486 1491 clearProgramCache(); 1487 1492 1488 1493 progCache = RemoteGetRecordedList(allOrder == 0 || type == Delete); 1489 1494 } 1495 VERBOSE(VB_IMPORTANT, "FillList() 3"); 1490 1496 1491 1497 if (progCache) 1492 1498 { … … 1606 1612 } 1607 1613 } 1608 1614 } 1615 VERBOSE(VB_IMPORTANT, "FillList() 4"); 1609 1616 1610 1617 if (sortedList.count() == 0) 1611 1618 { … … 1615 1622 titleIndex = 0; 1616 1623 playList.clear(); 1617 1624 1625 VERBOSE(VB_IMPORTANT, "FillList() -- end A"); 1618 1626 return 0; 1619 1627 } 1620 1628 … … 1663 1671 } 1664 1672 } 1665 1673 1674 VERBOSE(VB_IMPORTANT, "FillList() 5"); 1675 1666 1676 if (progLists[watchGroup].count() > 1) 1667 1677 { 1668 1678 QDateTime now = QDateTime::currentDateTime(); … … 1823 1833 } 1824 1834 progLists[watchGroup].Sort(comp_recpriority2); 1825 1835 } 1836 VERBOSE(VB_IMPORTANT, "FillList() 6"); 1826 1837 1827 1838 // Try to find our old place in the title list. Scan the new 1828 1839 // titles backwards until we find where we were or go past. This … … 1851 1862 break; 1852 1863 } 1853 1864 1865 VERBOSE(VB_IMPORTANT, "FillList() 7"); 1854 1866 // Now do pretty much the same thing for the individual shows on 1855 1867 // the specific program list if needed. 1856 1868 if (oldtitle != titleList[titleIndex] || oldchanid.isNull()) … … 1927 1939 } 1928 1940 } 1929 1941 1942 VERBOSE(VB_IMPORTANT, "FillList() -- end B"); 1930 1943 return (progCache != NULL); 1931 1944 } 1932 1945 -
programs/mythbackend/mainserver.cpp
8 8 #include <qwaitcondition.h> 9 9 #include <qregexp.h> 10 10 11 #include <sys/time.h> 11 12 #include <cstdlib> 12 13 #include <cerrno> 13 14 #include <math.h> … … 1004 1005 1005 1006 void MainServer::HandleQueryRecordings(QString type, PlaybackSock *pbs) 1006 1007 { 1008 VERBOSE(VB_IMPORTANT, "HandleQueryRecordings("<<type<<") -- begin"); 1007 1009 MythSocket *pbssock = pbs->getSocket(); 1008 1010 bool islocal = pbs->isLocal(); 1009 1011 QString playbackhost = pbs->getHostname(); … … 1231 1233 proginfo->pathname = QString("myth://") + ip + ":" + port 1232 1234 + "/" + basename; 1233 1235 1236 struct timeval stat_beg, stat_end; 1237 gettimeofday(&stat_beg, NULL); 1234 1238 if (proginfo->filesize == 0) 1235 1239 { 1236 1240 struct stat st; … … 1243 1247 1244 1248 proginfo->SetFilesize(size); 1245 1249 } 1250 gettimeofday(&stat_end, NULL); 1251 1252 double stat_time = (stat_end.tv_sec - stat_beg.tv_sec ) + 1253 (stat_end.tv_usec - stat_beg.tv_usec) / 1000000.0; 1254 if (stat_time > 1.0) 1255 { 1256 VERBOSE(VB_IMPORTANT, QString( 1257 "stat took %1 seconds on file '%2'" 1258 "\n\t\t\ttitle: '%3' \nsubtitle: '%4' with avail '%5'") 1259 .arg(stat_time) 1260 .arg(proginfo->pathname).arg(proginfo->title) 1261 .arg(proginfo->subtitle).arg( 1262 (proginfo->availableStatus==asAvailable) ? 1263 "available" : 1264 ((proginfo->availableStatus==asPendingDelete) ? 1265 "deleting" : 1266 ((proginfo->availableStatus==asFileNotFound) ? 1267 "file not found" : "unnknown")))); 1268 } 1246 1269 } 1247 1270 else 1248 1271 {