--- a/engine/src/FeedEngine.cpp Tue Nov 16 18:02:18 2010 +0000
+++ b/engine/src/FeedEngine.cpp Fri Nov 19 01:47:31 2010 +0000
@@ -261,15 +261,7 @@
}
iActiveFeed = GetFeedInfoByUid(aFeedUid);
-
iCancelRequested = EFalse;
-
- if (iActiveFeed->LastUpdated() == 0)
- {
- newFeed = ETrue;
- }
-
- showsAdded = 0;
iActiveFeed->SetLastError(KErrNone);
DBUpdateFeedL(*iActiveFeed);
@@ -312,14 +304,6 @@
aItem.SetDescriptionL(*description);
CleanupStack::PopAndDestroy(description);
- if (newFeed) {
- // for new feeds, set all shows played
- aItem.SetPlayState(EPlayed);
- // except the first one
- if (showsAdded == 0) {
- aItem.SetPlayState(ENeverPlayed);
- }
- }
TRAPD(err, iPodcastModel.ShowEngine().AddShowL(aItem));
@@ -329,7 +313,6 @@
iPodcastModel.ShowEngine().AddDownloadL(aItem);
}
- showsAdded++;
DP("CFeedEngine::NewShowL END");
}
@@ -609,10 +592,7 @@
{
if (!iCancelRequested) {
iActiveFeed->SetLastError(aError);
- TTime time;
- time.HomeTime();
- iActiveFeed->SetLastUpdated(time);
-
+
if( aError == KErrNone)
{
// Parse the feed. We need to trap this call since it could leave and then
@@ -655,6 +635,9 @@
// even if it fails, this will allow us to move on
iClientState = EIdle;
}
+ TTime time;
+ time.HomeTime();
+ iActiveFeed->SetLastUpdated(time);
}
iCancelRequested = EFalse;
}break;
@@ -1214,3 +1197,13 @@
iObservers[i]->OpmlParsingComplete(aError, aNumFeedsAdded);
}
}
+
+void CFeedEngine::ParserShowUpdatedL(CShowInfo& aShow)
+ {
+ iPodcastModel.ShowEngine().UpdateShowL(aShow);
+ if (aShow.PlayState() == ENeverPlayed &&
+ iPodcastModel.SettingsEngine().DownloadAutomatically())
+ {
+ iPodcastModel.ShowEngine().AddDownloadL(aShow);
+ }
+ }