diff -r 3b59b88b089e -r b03018fb3418 engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Mon Apr 05 13:54:26 2010 +0100 +++ b/engine/src/ShowEngine.cpp Sat Apr 24 18:58:55 2010 +0100 @@ -1359,3 +1359,33 @@ { iDownloadErrors = KMaxDownloadErrors; } + +EXPORT_C void CShowEngine::CheckForDeletedShows(TUint aFeedUid) + { + RShowInfoArray shows; + + TRAPD(err, DBGetShowsByFeedL(shows, aFeedUid)); + + if (err != KErrNone) + { + // probably a catastrophic error, but it doesn't + // matter for this method + return; + } + + for (int i=0;iDownloadState() == EDownloaded && shows[i]->FileName() != KNullDesC) + { + if(!BaflUtils::FileExists(iPodcastModel.FsSession(),shows[i]->FileName())) + { + // file doesn't exist anymore, assume it was deleted from outside + DP1("Show %S does not exist on disk, flagging as non downloaded", &shows[i]->FileName()); + shows[i]->SetDownloadState(ENotDownloaded); + shows[i]->SetPlayState(EPlayed); + TRAP_IGNORE(DBUpdateShowL(*shows[i])); + } + } + } + } +