mpxplugins/serviceplugins/collectionplugins/mpxsqlitepodcastdbplugin/src/mpxpodcastdbplugin.cpp
equal
deleted
inserted
replaced
3048 { |
3048 { |
3049 User::Leave(KErrArgument); |
3049 User::Leave(KErrArgument); |
3050 } |
3050 } |
3051 |
3051 |
3052 TInt drive = aCmd.ValueTObjectL<TInt>(KMPXCommandCollectionCountDrive); |
3052 TInt drive = aCmd.ValueTObjectL<TInt>(KMPXCommandCollectionCountDrive); |
3053 TInt count = (TInt)iDbHandler->GetTotalCountL(drive); |
3053 |
|
3054 TInt count = 0; |
|
3055 TRAPD( totalerr, count = (TInt)iDbHandler->GetTotalCountL(drive) ); |
|
3056 MPX_DEBUG2( "CMPXPodcastDbPlugin::DoGetCollectionCountL, totalerr =%d", totalerr ); |
|
3057 if ( totalerr == KErrCorrupt ) |
|
3058 { |
|
3059 iDbHandler->CloseDatabaseL( drive ); |
|
3060 iDbHandler->RecreateDatabaseFileL( drive ); |
|
3061 iDbHandler->OpenDatabaseL( drive ); |
|
3062 count = (TInt)iDbHandler->GetTotalCountL(drive); |
|
3063 } |
|
3064 |
3054 ((CMPXMedia&)aCmd).SetTObjectValueL<TInt>(KMPXCommandCollectionCountValue, count); |
3065 ((CMPXMedia&)aCmd).SetTObjectValueL<TInt>(KMPXCommandCollectionCountValue, count); |
3055 } |
3066 } |
3056 |
3067 |
3057 // ---------------------------------------------------------------------------------------------------------- |
3068 // ---------------------------------------------------------------------------------------------------------- |
3058 // Get URIs for all podcasts in a database |
3069 // Get URIs for all podcasts in a database |