Ticket #219: auto-exp-verbose.patch
File auto-exp-verbose.patch, 2.8 KB (added by , 19 years ago) |
---|
-
autoexpire.cpp
419 419 420 420 query.prepare(querystr); 421 421 422 VERBOSE(VB_FILE, QString("Found %1 episodes in recording profile %2 " 423 "using max expiration") 424 .arg(query.numRowsAffected()) 425 .arg(maxIter.key())); 426 if (query.exec() && query.isActive() && query.size() > 0) 427 { 428 int found = 0; 429 while (query.next()) 430 { 431 found++; 432 433 if (found > maxIter.data()) 422 if (query.exec() && query.isActive()) 423 { 424 VERBOSE(VB_FILE, QString("Found %1 episodes in recording profile %2 " 425 "using max expiration") 426 .arg(query.numRowsAffected()) 427 .arg(maxIter.key())); 428 if (query.size() > 0) 429 { 430 int found = 0; 431 while (query.next()) 434 432 { 435 QString msg = QString("Expiring \"%1\" from %2, " 436 "too many episodes.") 437 .arg(query.value(2).toString()) 438 .arg(query.value(1).toString()); 439 VERBOSE(VB_FILE, msg); 440 gContext->LogEntry("autoexpire", LP_NOTICE, 441 "Expired program", msg); 433 found++; 442 434 443 msg = QString("AUTO_EXPIRE %1 %2") 444 .arg(query.value(0).toString()) 445 .arg(query.value(1).toDateTime() 446 .toString(Qt::ISODate)); 435 if (found > maxIter.data()) 436 { 437 QString msg = QString("Expiring \"%1\" from %2, " 438 "too many episodes.") 439 .arg(query.value(2).toString()) 440 .arg(query.value(1).toString()); 441 VERBOSE(VB_FILE, msg); 442 gContext->LogEntry("autoexpire", LP_NOTICE, 443 "Expired program", msg); 447 444 448 MythEvent me(msg); 449 gContext->dispatchNow(me); 450 } 445 msg = QString("AUTO_EXPIRE %1 %2") 446 .arg(query.value(0).toString()) 447 .arg(query.value(1).toDateTime() 448 .toString(Qt::ISODate)); 449 450 MythEvent me(msg); 451 gContext->dispatchNow(me); 452 } 453 } 451 454 } 452 455 } 456 else 457 { 458 VERBOSE(VB_FILE, QString("Query failed trying to find episodes in " 459 "recording profile %1 using max expiration") 460 .arg(maxIter.key())); 461 } 453 462 } 454 463 } 455 464