equal
deleted
inserted
replaced
166 // For now, the default collection to add this playlist is |
166 // For now, the default collection to add this playlist is |
167 // EMPXCollectionPluginMusic. This will be revised later when there is a |
167 // EMPXCollectionPluginMusic. This will be revised later when there is a |
168 // generic way of resolving collections aside from using file extension |
168 // generic way of resolving collections aside from using file extension |
169 // or UID. |
169 // or UID. |
170 // |
170 // |
|
171 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
|
172 if ( aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) == EMPXItem && |
|
173 (aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXPlaylist || |
|
174 aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXAbstractAlbum)) |
|
175 #else |
171 if ( aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) == EMPXItem && |
176 if ( aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) == EMPXItem && |
172 aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXPlaylist ) |
177 aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory) == EMPXPlaylist ) |
|
178 #endif |
173 { |
179 { |
174 aMedia->SetTObjectValueL<TUid>( KMPXMediaGeneralCollectionId, |
180 aMedia->SetTObjectValueL<TUid>( KMPXMediaGeneralCollectionId, |
175 iMusicCollectionId ); |
181 iMusicCollectionId ); |
176 } |
182 } |
177 |
183 |
346 // |
352 // |
347 // leave if not updating a song or a playlist |
353 // leave if not updating a song or a playlist |
348 // |
354 // |
349 TMPXGeneralCategory category = |
355 TMPXGeneralCategory category = |
350 aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory); |
356 aMedia->ValueTObjectL<TMPXGeneralCategory>(KMPXMediaGeneralCategory); |
351 |
357 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
|
358 if ((aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) != EMPXItem) || |
|
359 (category != EMPXSong && category != EMPXPlaylist && category != EMPXAbstractAlbum)) |
|
360 #else |
352 if ((aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) != EMPXItem) || |
361 if ((aMedia->ValueTObjectL<TMPXGeneralType>(KMPXMediaGeneralType) != EMPXItem) || |
353 (category != EMPXSong && category != EMPXPlaylist)) |
362 (category != EMPXSong && category != EMPXPlaylist)) |
|
363 #endif |
354 { |
364 { |
355 User::Leave( KErrArgument ); |
365 User::Leave( KErrArgument ); |
356 } |
366 } |
357 |
367 |
358 // |
368 // |
464 const TArray<TMPXAttribute>& aAttrs, |
474 const TArray<TMPXAttribute>& aAttrs, |
465 TMPXGeneralCategory aItemCat ) |
475 TMPXGeneralCategory aItemCat ) |
466 { |
476 { |
467 MPX_FUNC("CMPXCollectionHelperImp::GetL"); |
477 MPX_FUNC("CMPXCollectionHelperImp::GetL"); |
468 MPX_DEBUG2("aFile %S", &aFile); |
478 MPX_DEBUG2("aFile %S", &aFile); |
469 |
479 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
|
480 if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist && aItemCat != EMPXAbstractAlbum) |
|
481 #else |
470 if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist) |
482 if (aItemCat != EMPXSong && aItemCat != EMPXPlaylist) |
|
483 #endif |
471 { |
484 { |
472 User::Leave(KErrArgument); |
485 User::Leave(KErrArgument); |
473 } |
486 } |
474 |
487 |
475 // Playlists synced through MTP contains .pla extension and there |
488 // Playlists synced through MTP contains .pla extension and there |