engine/src/ShowEngine.cpp
changeset 122 dd31cab34e27
parent 118 b03018fb3418
child 126 c2f1ea38ec70
equal deleted inserted replaced
121:1cc7501102a8 122:dd31cab34e27
   125 	if (!iPodcastModel.SettingsEngine().DownloadSuspended() && iShowDownloading != NULL
   125 	if (!iPodcastModel.SettingsEngine().DownloadSuspended() && iShowDownloading != NULL
   126 			&& iShowDownloading->Uid() == aUid)
   126 			&& iShowDownloading->Uid() == aUid)
   127 		{
   127 		{
   128 		DP("CShowEngine::RemoveDownload\t This is the active download, we suspend downloading");
   128 		DP("CShowEngine::RemoveDownload\t This is the active download, we suspend downloading");
   129 		SuspendDownloads();
   129 		SuspendDownloads();
       
   130 		
       
   131 		// partial downloads should be removed
       
   132 		BaflUtils::DeleteFile(iPodcastModel.FsSession(), iShowDownloading->FileName());
       
   133 
   130 		resumeAfterRemove = ETrue;
   134 		resumeAfterRemove = ETrue;
   131 		}
   135 		}
   132 
   136 
   133 	CShowInfo *info = DBGetShowByUidL(aUid);
   137 	CShowInfo *info = DBGetShowByUidL(aUid);
   134 	if (info != NULL)
   138 	if (info != NULL)
   137 		DBUpdateShowL(*info);
   141 		DBUpdateShowL(*info);
   138 		delete info;
   142 		delete info;
   139 		}
   143 		}
   140 	
   144 	
   141 	DBRemoveDownloadL(aUid);
   145 	DBRemoveDownloadL(aUid);
   142 
       
   143 	// partial downloads should be removed
       
   144 	if (iShowDownloading)
       
   145 		{
       
   146 		BaflUtils::DeleteFile(iPodcastModel.FsSession(), iShowDownloading->FileName());
       
   147 		}
       
   148 
   146 
   149 	if (resumeAfterRemove)
   147 	if (resumeAfterRemove)
   150 		{
   148 		{
   151 		ResumeDownloadsL();
   149 		ResumeDownloadsL();
   152 		}
   150 		}