--- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp Tue Sep 14 21:23:06 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp Wed Sep 15 12:15:24 2010 +0300
@@ -41,6 +41,7 @@
#include "vcxhgmyvideosvideomodelhandler.h"
#include "vcxhgmyvideosvideolistimpl.h"
#include "vcxhgmyvideosvideodataupdater.h"
+#include "vcxhgmyvideosthumbnailmanager.h"
#include "vcxhgmyvideos.hrh"
#include "vcxhgmyvideoslistbase.h"
@@ -603,6 +604,7 @@
TMPXItemId mpxItemId = media->ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId );
SetVideoLastWatchedL( *media );
ClearNewVideoFlagL( *media );
+ ResetEmptyDrmThumnailL( *media, aIndex );
IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::PlayVideoL() aIndex=%d mpxItemId=%d", aIndex, (TInt) mpxItemId );
iModel.CollectionClient().PlayVideoL( mpxItemId );
}
@@ -1417,3 +1419,29 @@
aMedia.ValueTObjectL<TMPXItemId>( KMPXMediaGeneralId ), flags );
}
}
+
+// -----------------------------------------------------------------------------
+// CVcxHgMyVideosVideoModelHandler::ResetEmptyDrmThumnailL()
+// -----------------------------------------------------------------------------
+//
+void CVcxHgMyVideosVideoModelHandler::ResetEmptyDrmThumnailL( CMPXMedia& aMedia, TInt aIndex )
+ {
+ CHgItem& item = iScroller.ItemL( aIndex );
+
+ if ( !item.Icon() )
+ {
+ if ( aMedia.IsSupported( KMPXMediaGeneralFlags ) &&
+ aMedia.ValueTObjectL<TUint32>( KMPXMediaGeneralFlags )
+ == EVcxMyVideosVideoDrmProtected );
+ {
+ CThumbnailObjectSource* source =
+ CThumbnailObjectSource::NewLC( aMedia.ValueText( KMPXMediaGeneralUri ), NULL );
+
+ // We cannot know at this phase, do the user get the license
+ // when playing the video, so we have to reset this every time.
+ iModel.ThumbnailManager().Reset( *source );
+
+ CleanupStack::PopAndDestroy( source );
+ }
+ }
+ }