diff -r f87e8c4ac026 -r 3eb824b18d67 videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp --- 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( 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( 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( 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 ); + } + } + }