equal
deleted
inserted
replaced
552 } |
552 } |
553 else |
553 else |
554 { |
554 { |
555 User::Leave(KErrCorrupt); |
555 User::Leave(KErrCorrupt); |
556 } |
556 } |
|
557 |
|
558 // now update DB |
|
559 _LIT(KSqlStatement2, "update shows set downloadstate=%d and deletedate = 0 where downloadstate=%d and deletedate != 0 and deletedate < \"%Ld\""); |
|
560 iSqlBuffer.Format(KSqlStatement2, ENotDownloaded, EDownloaded, now.Int64()); |
|
561 |
|
562 |
|
563 rc = sqlite3_prepare16_v2(&iDB, (const void*) iSqlBuffer.PtrZ(), -1, |
|
564 &st, (const void**) NULL); |
|
565 |
|
566 if (rc == SQLITE_OK) |
|
567 { |
|
568 rc = sqlite3_step(st); |
|
569 Cleanup_sqlite3_finalize_PushL(st); |
|
570 CleanupStack::PopAndDestroy();//st |
|
571 } |
|
572 |
|
573 |
557 DP("CShowEngine::DBGetOldShowsL END"); |
574 DP("CShowEngine::DBGetOldShowsL END"); |
558 } |
575 } |
559 |
576 |
560 CShowInfo* CShowEngine::DBGetNextDownloadL() |
577 CShowInfo* CShowEngine::DBGetNextDownloadL() |
561 { |
578 { |
1678 { |
1695 { |
1679 TTime deleteDate; |
1696 TTime deleteDate; |
1680 deleteDate.HomeTime(); |
1697 deleteDate.HomeTime(); |
1681 deleteDate += daysAhead; |
1698 deleteDate += daysAhead; |
1682 aShow->SetDeleteDate(deleteDate); |
1699 aShow->SetDeleteDate(deleteDate); |
|
1700 DP2("Setting show %S to be deleted on the %d th", &aShow->Title(), deleteDate.DayNoInMonth()); |
1683 } |
1701 } |
1684 |
1702 |
1685 UpdateShowL(*aShow); |
1703 UpdateShowL(*aShow); |
1686 DP("CShowEngine::PostPlayHandling END"); |
1704 DP("CShowEngine::PostPlayHandling END"); |
1687 } |
1705 } |