videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp
changeset 46 adbe7d5ba2f5
parent 28 c48470be1ba7
--- a/videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp	Fri Jun 11 13:39:54 2010 +0300
+++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideosopenhandler.cpp	Wed Jun 23 18:14:16 2010 +0300
@@ -126,7 +126,7 @@
             {
             //we are at root level, return main level items (categories + albums)
 
-#ifndef VIDEO_COLLECTION_PLUGIN_TB92            
+#ifdef VCX_ALBUMS             
             iCollection.AlbumsL().CreateAlbumListL(); //async
 #endif
 
@@ -146,7 +146,7 @@
                 !iCache.IsComplete() );
                 
             TVcxMyVideosCollectionUtil::AppendToListL( *itemList, *iCollection.CategoriesL().iList );
-#ifndef VIDEO_COLLECTION_PLUGIN_TB92
+#ifdef VCX_ALBUMS
             TVcxMyVideosCollectionUtil::AppendToListL( *itemList, *iCollection.AlbumsL().iAlbumList );
 #endif
             itemList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
@@ -160,7 +160,7 @@
             {
             //we are at second level, return video list from some category or album
 
-#ifndef VIDEO_COLLECTION_PLUGIN_TB92
+#ifdef VCX_ALBUMS
             iCollection.AlbumsL().CreateAlbumListL(); //async
 #endif
 
@@ -390,7 +390,7 @@
 
         iCollection.CategoriesL().UpdateCategoriesNewVideoNamesL();
 
-        iCollection.AlbumsL().CalculateAttributesL();
+        iCollection.AlbumsL().CalculateAttributesL(); // adds events if attributes modified, does not send
         
         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );
         }
@@ -511,11 +511,6 @@
         MPX_DEBUG2("CVcxMyVideosOpenHandler:: First videos for album %d arrived, calling HandleOpen()", aAlbumId);
         
         iAlbumVideoList->SetCObjectValueL( KMPXMediaGeneralContainerPath, iPath );
-        if ( aComplete )
-            {
-            iAlbumVideoList->SetTObjectValueL<TInt>( KVcxMediaMyVideosInt32Value,
-                    EVcxMyVideosVideoListComplete );
-            }
         iCollection.iObs->HandleOpen( iAlbumVideoList, aError );
         iPendingAlbumOpenId = 0;
         }
@@ -526,14 +521,16 @@
 
         MPX_DEBUG3("CVcxMyVideosOpenHandler:: adding modify event for album %d, extra info = %d",
                 aAlbumId, EVcxMyVideosVideoListOrderChanged );
-        iCollection.iMessageList->AddEventL( TMPXItemId( aAlbumId, 2 ), EMPXItemModified,
+        iCollection.iMessageList->AddEventL( TMPXItemId( aAlbumId, KVcxMvcMediaTypeAlbum ), EMPXItemModified,
                 EVcxMyVideosVideoListOrderChanged );
         }
     else
         {
         //TODO: should add album id
-        iCollection.AlbumsL().CalculateAttributesL();
+        iCollection.AlbumsL().CalculateAttributesL(); // adds events if attributes modified, does not send
 
+        iAlbumVideoList->SetTObjectValueL<TInt>( KVcxMediaMyVideosInt32Value,
+                    EVcxMyVideosVideoListComplete );
         iCollection.iMessageList->AddEventL( KVcxMessageMyVideosListComplete );