--- 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 <httperr.h>
#include "debug.h"
#include "PodcastUtils.h"
-
-//#include <mpxmedia.h>
-//#include <mpxattribute.h>
-//#include <mpxmediageneraldefs.h>
+#include <mpxcollectionhelperfactory.h>
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<TInt> 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)