--- a/engine/src/FeedEngine.cpp Fri Nov 19 01:08:10 2010 +0000
+++ b/engine/src/FeedEngine.cpp Fri Nov 19 01:27:00 2010 +0000
@@ -1201,4 +1201,9 @@
void CFeedEngine::ParserShowUpdatedL(CShowInfo& aShow)
{
iPodcastModel.ShowEngine().UpdateShowL(aShow);
+ if (aShow.PlayState() == ENeverPlayed &&
+ iPodcastModel.SettingsEngine().DownloadAutomatically())
+ {
+ iPodcastModel.ShowEngine().AddDownloadL(aShow);
+ }
}
--- 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()