engine/src/ShowEngine.cpp
branchRCL_3
changeset 376 31968c23152c
parent 369 c683165bec63
child 383 931d0db6374d
--- a/engine/src/ShowEngine.cpp	Tue Nov 16 18:02:18 2010 +0000
+++ b/engine/src/ShowEngine.cpp	Fri Nov 19 01:47:31 2010 +0000
@@ -545,7 +545,7 @@
 //	TTimeIntervalYears years(5);
 //	now += years;
 	
-	_LIT(KSqlStatement, "select filename from shows where downloadstate=%d and deletedate < \"%Ld\"");
+	_LIT(KSqlStatement, "select filename from shows where downloadstate=%d and deletedate != 0 and deletedate < \"%Ld\"");
 	iSqlBuffer.Format(KSqlStatement, EDownloaded, now.Int64());
 
 	sqlite3_stmt *st;
@@ -1481,6 +1481,12 @@
 EXPORT_C void CShowEngine::UpdateShowL(CShowInfo& aInfo)
 	{
 	DBUpdateShowL(aInfo);
+	
+	// hack to ensure change in playstate is stored for the show actively downloading
+	if (iShowDownloading && iShowDownloading->Uid() == aInfo.Uid())
+		{
+		iShowDownloading->SetPlayState(aInfo.PlayState());
+		}	
 	}
 
 EXPORT_C CMetaDataReader& CShowEngine::MetaDataReader()