diff -r 46e6a623d36d -r c70a6524a236 engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Mon May 03 15:23:15 2010 +0100 +++ b/engine/src/ShowEngine.cpp Mon May 03 16:09:50 2010 +0100 @@ -26,10 +26,7 @@ #include #include "debug.h" #include "PodcastUtils.h" - -//#include -//#include -//#include +#include const TUint KMaxDownloadErrors = 3; const TInt KMimeBufLength = 100; @@ -47,6 +44,9 @@ delete iShowDownloading; delete iMetaDataReader; iApaSession.Close(); + + if (iCollectionHelper) + delete iCollectionHelper; } EXPORT_C CShowEngine* CShowEngine::NewL(CPodcastModel& aPodcastModel) @@ -239,15 +239,14 @@ } } -void CShowEngine::AddShowToMpxCollection(CShowInfo &/*aShowInfo*/) +void CShowEngine::AddShowToMpxCollection(CShowInfo &aShowInfo) { -/* RArray contentIDs; - contentIDs.AppendL( KMPXMediaIdGeneral ); + if (!iCollectionHelper) + iCollectionHelper = CMPXCollectionHelperFactory::NewCollectionHelperL(); - CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() ); - CleanupStack::PushL( media ); - contentIDs.Close(); - CleanupStack::PopAndDestroy(media); */ + // if this leaves, not much we can do anyway + TRAP_IGNORE(iCollectionHelper->AddL(aShowInfo.FileName(), this)); + } void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)