videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp
branchRCL_3
changeset 23 befca0ec475f
parent 22 839377eedc2b
equal deleted inserted replaced
22:839377eedc2b 23:befca0ec475f
   440             
   440             
   441             CategoriesL().ResetVideoCountersL();
   441             CategoriesL().ResetVideoCountersL();
   442             CategoriesL().UpdateCategoriesL( *iCache->iVideoList, 0 );
   442             CategoriesL().UpdateCategoriesL( *iCache->iVideoList, 0 );
   443             CategoriesL().UpdateCategoriesNewVideoNamesL();
   443             CategoriesL().UpdateCategoriesNewVideoNamesL();
   444             
   444             
   445 #ifdef VCX_ALBUMS
   445 #ifdef VCX_ALBUMS 
   446             // Adds changed album indexes to Albums().iChangedAlbums.
       
   447             // AlbumsL().UpdateChangedAlbumsL() will update the changed ones and add events.
       
   448             AlbumsL().VideosAddedOrRemovedFromCacheL( aId );
       
   449             
       
   450             AlbumsL().RemoveAlbumsL( aId );
   446             AlbumsL().RemoveAlbumsL( aId );
   451 #endif
   447 #endif
   452             }
   448             }
   453             break;
   449             break;
   454         
   450         
   472             // video condition and only video objects are added to cache. Items which were detected
   468             // video condition and only video objects are added to cache. Items which were detected
   473             // to not be videos are added to nonVideoIds.
   469             // to not be videos are added to nonVideoIds.
   474             iCache->AddVideosFromMdsL( aId, videoListFetchingWasCancelled,
   470             iCache->AddVideosFromMdsL( aId, videoListFetchingWasCancelled,
   475                     &nonVideoIds, EFalse /* dont update categories*/ );
   471                     &nonVideoIds, EFalse /* dont update categories*/ );
   476 
   472 
   477             if ( aId.Count() )
   473             CategoriesL().ResetVideoCountersL();
   478                 {
   474             CategoriesL().UpdateCategoriesL( *iCache->iVideoList, 0 );
   479                 CategoriesL().ResetVideoCountersL();
   475             CategoriesL().UpdateCategoriesNewVideoNamesL();
   480                 CategoriesL().UpdateCategoriesL( *iCache->iVideoList, 0 );
       
   481                 CategoriesL().UpdateCategoriesNewVideoNamesL();
       
   482 
       
   483 #ifdef VCX_ALBUMS          
       
   484                 // Adds changed album indexes to Albums().iChangedAlbums.
       
   485                 // AlbumsL().UpdateChangedAlbumsL() will update the changed ones and add events.
       
   486                 AlbumsL().VideosAddedOrRemovedFromCacheL( aId );
       
   487 #endif
       
   488                 }
       
   489             
   476             
   490 #ifdef VCX_ALBUMS
   477 #ifdef VCX_ALBUMS
   491 #if 0 //TODO: do this if we want to support albums which are being added by someone else than My Videos Collection
   478 #if 0 //TODO: do this if we want to support albums which are being added by someone else than My Videos Collection
   492             
   479             
   493             //After the call nonVideoIds will contain only items which were actually added
   480             //After the call nonVideoIds will contain only items which were actually added
   494             //to albums.
   481             //to albums.
   495             AlbumsL().AddAlbumsFromMdsL( nonVideoIds );
   482             AlbumsL().AddAlbumsFromMdsL( nonVideoIds );
   496 #else
       
   497             nonVideoIds.Reset();
       
   498 #endif
   483 #endif
   499 #endif
   484 #endif
   500             
   485             
   501             if ( videoListFetchingWasCancelled )
   486             if ( videoListFetchingWasCancelled )
   502                 {
   487                 {
   579         {
   564         {
   580         TRAP_IGNORE( iMessageList->AddEventL(
   565         TRAP_IGNORE( iMessageList->AddEventL(
   581                 TMPXItemId( nonVideoIds[i], KVcxMvcMediaTypeAlbum ), aEvent ) );
   566                 TMPXItemId( nonVideoIds[i], KVcxMvcMediaTypeAlbum ), aEvent ) );
   582         }
   567         }
   583 
   568 
   584     AlbumsL().UpdateChangedAlbumsL();
   569     iAlbums->UpdateChangedAlbumsL();
   585 #endif
   570 #endif
   586 
   571 
   587     CleanupStack::PopAndDestroy( &nonVideoIds );
   572     CleanupStack::PopAndDestroy( &nonVideoIds );
   588 	iMessageList->SendL();
   573 	iMessageList->SendL();
   589     }
   574     }