diff -r b73a2e62868f -r 6752808b2036 harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp --- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Tue Feb 02 00:24:33 2010 +0200 +++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Fri Feb 19 23:14:48 2010 +0200 @@ -23,6 +23,7 @@ #include #include +#include "harvestercommon.h" #include "harvesteraudioplugin.h" #include "harvesteraudiopluginutils.h" #include "mdsutils.h" @@ -129,12 +130,13 @@ CleanupStack::PopAndDestroy( rep ); iAudioParser = CAudioMDParser::NewL( iHarvestAlbumArt ); - iAudioParser->ResetL(); if( iHarvestAlbumArt ) { TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) ); } + + SetPriority( KHarvesterPriorityHarvestingPlugin - 1); } // --------------------------------------------------------------------------- @@ -168,7 +170,7 @@ } // --------------------------------------------------------------------------- -// CHarvesterAudioPlugin::HarvestL (from CHarvesterPlugin) +// CHarvesterAudioPlugin::ThumbnailReady // --------------------------------------------------------------------------- // void CHarvesterAudioPlugin::ThumbnailReady( TInt /*aError*/, @@ -179,6 +181,25 @@ } // --------------------------------------------------------------------------- +// CHarvesterAudioPlugin::GetMimeType (from CHarvesterPlugin) +// --------------------------------------------------------------------------- +// +void CHarvesterAudioPlugin::GetMimeType( const TDesC& aUri, TDes& aMimeType ) + { + aMimeType.Zero(); + + const TMimeTypeMapping* mapping = + iAudioParser->ParseMimeType( aUri ); + + if ( !mapping ) + { + return; + } + + aMimeType = mapping->iMimeType; + } + +// --------------------------------------------------------------------------- // CHarvesterAudioPlugin::DoHarvestL // --------------------------------------------------------------------------- // @@ -279,7 +300,7 @@ const TMimeTypeMapping* mapping = iAudioParser->ParseMimeType( mdeObject.Uri() ); - if ( mapping ) + if ( mapping && !mdeObject.Placeholder() ) { if( !iPropDefs ) { @@ -343,17 +364,9 @@ if ( song.Length() > 0 && song.Length() < iPropDefs->iTitlePropertyDef->MaxTextLengthL() ) - { - TRAPD( error, CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, - *iPropDefs->iTitlePropertyDef, &song, aIsAdd ) ); - if( error != KErrNone ) - { - CMdEProperty* prop = NULL; - const TInt index = mdeObject.Property( *iPropDefs->iTitlePropertyDef, prop ); - mdeObject.RemoveProperty( index ); - CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, - *iPropDefs->iTitlePropertyDef, &song, aIsAdd ); - } + { + CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, + *iPropDefs->iTitlePropertyDef, &song, EFalse ); } if ( artist.Length() > 0