engine/src/FeedEngine.cpp
branchRCL_3
changeset 334 a7cb97979427
parent 328 75a70f4a4f6d
child 342 9441fb8fd60d
--- a/engine/src/FeedEngine.cpp	Fri Nov 12 17:27:16 2010 +0100
+++ b/engine/src/FeedEngine.cpp	Fri Nov 12 17:27:40 2010 +0100
@@ -101,6 +101,7 @@
 
 CFeedEngine::~CFeedEngine()
 	{
+	DP("~CFeedEngine BEGIN");
 	iObservers.Close();
 	
 	iFeedsUpdating.Close();
@@ -112,6 +113,7 @@
 	delete iOpmlParser;
 	//
 	delete iRepository;
+	DP("~CFeedEngine END");
 	}
 
 /**
@@ -299,7 +301,7 @@
 
 void CFeedEngine::NewShowL(CShowInfo& aItem)
 	{
-	DP1("NewShowL, aItem.Title()=%S", &aItem.Title());
+	DP1("CFeedEngine::NewShowL BEGIN, aItem.Title()=%S", &aItem.Title());
 	HBufC* description = HBufC::NewLC(KMaxDescriptionLength);
 	TPtr ptr(description->Des());
 	ptr.Copy(aItem.Description());
@@ -326,6 +328,7 @@
 		}
 	
 	showsAdded++;
+	DP("CFeedEngine::NewShowL END");
 	}
 
 void CFeedEngine::GetFeedImageL(CFeedInfo *aFeedInfo)
@@ -342,6 +345,11 @@
 
 	TFileName fileName;
 	PodcastUtils::FileNameFromUrl(aFeedInfo->ImageUrl(), fileName);
+	fileName.Trim();
+	
+	if (fileName.Length() == 0)
+		User::Leave(KErrNotFound);
+	
 	relPath.Append(fileName);
 	PodcastUtils::EnsureProperPathName(relPath);
 	
@@ -668,6 +676,7 @@
 				// now the image has been downloaded, so we set it again in the FeedInfo to start
 				// converting it
 				HBufC *fileNameCopy = iActiveFeed->ImageFileName().AllocLC();
+				DP1("fnc=%S", fileNameCopy);
 				TRAP_IGNORE(iActiveFeed->SetImageFileNameL(*fileNameCopy, &iPodcastModel));
 				CleanupStack::PopAndDestroy(fileNameCopy);
 				}