engine/src/ShowEngine.cpp
branchnewlist
changeset 354 a2713e6a41a9
parent 352 31f9864a37ac
child 355 075b3a49cb55
--- a/engine/src/ShowEngine.cpp	Mon Nov 15 21:37:46 2010 +0000
+++ b/engine/src/ShowEngine.cpp	Mon Nov 15 22:54:58 2010 +0000
@@ -519,8 +519,11 @@
 	DP("CShowEngine::DBGetOldShowsL BEGIN");
 	TTime now;
 	now.HomeTime();
-	_LIT(KSqlStatement, "select filename, deletedate shows where deletedate < %Ld");
-	iSqlBuffer.Format(KSqlStatement, now.Int64());
+//	TTimeIntervalYears years(5);
+//	now += years;
+	
+	_LIT(KSqlStatement, "select filename from shows where downloadstate=%d and deletedate < \"%Ld\"");
+	iSqlBuffer.Format(KSqlStatement, EDownloaded, now.Int64());
 
 	sqlite3_stmt *st;
 
@@ -535,14 +538,10 @@
 			{
 			CShowInfo* showInfo = CShowInfo::NewLC();
 
-			const void *filez = sqlite3_column_text16(st, 3);
+			const void *filez = sqlite3_column_text16(st, 0);
 			TPtrC16 file((const TUint16*) filez);
 			showInfo->SetFileNameL(file);
 
-			sqlite3_int64 deletedate = sqlite3_column_int64(st, 15);
-			TTime timedeletedate(deletedate);
-			showInfo->SetDeleteDate(timedeletedate);
-
 			aShowArray.Append(showInfo);
 			CleanupStack::Pop(showInfo);
 			rc = sqlite3_step(st);