Fix for bug 3626 - show filenames are now generated from UIDs RCL_3
authorSebastian Brannstrom <sebastianb@symbian.org>
Sat, 16 Oct 2010 20:10:01 +0100
branchRCL_3
changeset 257 f5377b5817a0
parent 256 572d166c9421
child 258 f02d87cb8d1f
Fix for bug 3626 - show filenames are now generated from UIDs
engine/inc/PodcastUtils.h
engine/src/PodcastUtils.cpp
engine/src/ShowEngine.cpp
--- a/engine/inc/PodcastUtils.h	Tue Oct 19 12:53:24 2010 +0100
+++ b/engine/inc/PodcastUtils.h	Sat Oct 16 20:10:01 2010 +0100
@@ -37,6 +37,7 @@
 _LIT(KVideoFormat1, ".wmv");
 _LIT(KVideoFormat2, ".avi");
 _LIT(KVideoFormat3, ".mp4");
+_LIT(KVideoFormat4, ".mov");
 
 
 
--- a/engine/src/PodcastUtils.cpp	Tue Oct 19 12:53:24 2010 +0100
+++ b/engine/src/PodcastUtils.cpp	Sat Oct 16 20:10:01 2010 +0100
@@ -314,7 +314,8 @@
 	{
 	if (aUrl.Find(KVideoFormat1) != KErrNotFound ||
 			aUrl.Find(KVideoFormat2) != KErrNotFound ||
-			aUrl.Find(KVideoFormat3) != KErrNotFound)
+			aUrl.Find(KVideoFormat3) != KErrNotFound ||
+			aUrl.Find(KVideoFormat4) != KErrNotFound)
 		{
 		return ETrue;
 		}
--- a/engine/src/ShowEngine.cpp	Tue Oct 19 12:53:24 2010 +0100
+++ b/engine/src/ShowEngine.cpp	Sat Oct 16 20:10:01 2010 +0100
@@ -197,7 +197,16 @@
 
 	TFileName fileName;
 	PodcastUtils::FileNameFromUrl(info->Url(), fileName);
-	relPath.Append(fileName);
+	
+	TFileName extension;
+	extension.Copy(fileName.Mid(fileName.LocateReverse('.')));
+	DP1("extension=%S", &extension);
+		
+	TFileName newFilename;
+	newFilename.Format(_L("%u%S"), info->Uid(), &extension);
+	DP1("newFilename=%S", &newFilename);
+			
+	relPath.Append(newFilename);
 	PodcastUtils::EnsureProperPathName(relPath);
 
 	// complete file path is base dir + rel path