equal
deleted
inserted
replaced
1357 |
1357 |
1358 void CShowEngine::FileError(TUint /*aError*/) |
1358 void CShowEngine::FileError(TUint /*aError*/) |
1359 { |
1359 { |
1360 iDownloadErrors = KMaxDownloadErrors; |
1360 iDownloadErrors = KMaxDownloadErrors; |
1361 } |
1361 } |
|
1362 |
|
1363 EXPORT_C void CShowEngine::CheckForDeletedShows(TUint aFeedUid) |
|
1364 { |
|
1365 RShowInfoArray shows; |
|
1366 |
|
1367 TRAPD(err, DBGetShowsByFeedL(shows, aFeedUid)); |
|
1368 |
|
1369 if (err != KErrNone) |
|
1370 { |
|
1371 // probably a catastrophic error, but it doesn't |
|
1372 // matter for this method |
|
1373 return; |
|
1374 } |
|
1375 |
|
1376 for (int i=0;i<shows.Count();i++) |
|
1377 { |
|
1378 if (shows[i]->DownloadState() == EDownloaded && shows[i]->FileName() != KNullDesC) |
|
1379 { |
|
1380 if(!BaflUtils::FileExists(iPodcastModel.FsSession(),shows[i]->FileName())) |
|
1381 { |
|
1382 // file doesn't exist anymore, assume it was deleted from outside |
|
1383 DP1("Show %S does not exist on disk, flagging as non downloaded", &shows[i]->FileName()); |
|
1384 shows[i]->SetDownloadState(ENotDownloaded); |
|
1385 shows[i]->SetPlayState(EPlayed); |
|
1386 TRAP_IGNORE(DBUpdateShowL(*shows[i])); |
|
1387 } |
|
1388 } |
|
1389 } |
|
1390 } |
|
1391 |