engine/src/ShowEngine.cpp
branchsymbian1
changeset 375 82f59b3393b3
parent 371 5077ef63bce2
child 381 29e277559820
--- a/engine/src/ShowEngine.cpp	Fri Nov 19 01:08:10 2010 +0000
+++ b/engine/src/ShowEngine.cpp	Fri Nov 19 01:27:00 2010 +0000
@@ -524,7 +524,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;
@@ -1460,6 +1460,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()