mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplugin.cpp
equal
deleted
inserted
replaced
2588 else if (category == EMPXPlaylist) |
2588 else if (category == EMPXPlaylist) |
2589 { |
2589 { |
2590 mediaId = iDbHandler->GetPlaylistIdMatchingUriL(uri); |
2590 mediaId = iDbHandler->GetPlaylistIdMatchingUriL(uri); |
2591 iDbHandler->RemovePlaylistL(mediaId, *fp, *itemChangedMessages); |
2591 iDbHandler->RemovePlaylistL(mediaId, *fp, *itemChangedMessages); |
2592 } |
2592 } |
2593 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2593 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
2594 else if (category == EMPXAbstractAlbum ) |
2594 else if (category == EMPXAbstractAlbum ) |
2595 { |
2595 { |
2596 mediaId = iDbHandler->GetAbstractAlbumIdMatchingUriL(uri); |
2596 mediaId = iDbHandler->GetAbstractAlbumIdMatchingUriL(uri); |
2597 iDbHandler->RemoveAbstractAlbumL(mediaId, *fp, *itemChangedMessages); |
2597 iDbHandler->RemoveAbstractAlbumL(mediaId, *itemChangedMessages, EFalse); |
2598 } |
2598 } |
2599 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
2599 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
2600 else |
2600 else |
2601 { |
2601 { |
2602 // otherwise unable to process this item |
2602 // otherwise unable to process this item |
3528 break; |
3528 break; |
3529 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
3529 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
3530 case EMPXAbstractAlbum: |
3530 case EMPXAbstractAlbum: |
3531 { |
3531 { |
3532 if (aMedia.IsSupported(KMPXMediaGeneralUri)) |
3532 if (aMedia.IsSupported(KMPXMediaGeneralUri)) |
3533 { |
3533 { |
3534 |
3534 //add abstractalbum to AbstractAlbum table |
3535 itemId = iDbHandler->AddAbstractAlbumL(aMedia, &aMessageArray); |
3535 itemId = iDbHandler->AddAbstractAlbumL(aMedia, &aMessageArray); |
3536 |
3536 |
|
3537 //in case aMedia as mediaArray which contains songs as arrayContents, need to update all songs associated |
3537 if ( aMedia.IsSupported(KMPXMediaArrayContents)) |
3538 if ( aMedia.IsSupported(KMPXMediaArrayContents)) |
3538 { |
3539 { |
3539 //need to update songs information to music table |
3540 iDbHandler->UpdateSongsAbstractAlbumInfoL(aMedia, aMessageArray); |
3540 CMPXMediaArray* array = aMedia.Value<CMPXMediaArray>(KMPXMediaArrayContents); |
|
3541 if (array->Count()) |
|
3542 { |
|
3543 iDbHandler->UpdateAbstractAlbumSongsL(aMedia, aMessageArray); |
|
3544 } |
|
3545 } |
3541 } |
3546 } |
3542 } |
3547 else |
3543 else |
3548 { |
3544 { |
3549 User::Leave(KErrArgument); |
3545 User::Leave(KErrArgument); |
3717 } |
3713 } |
3718 break; |
3714 break; |
3719 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
3715 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
3720 case EMPXAbstractAlbum: |
3716 case EMPXAbstractAlbum: |
3721 { |
3717 { |
3722 visibleChange = iDbHandler->UpdateAbstractAlbumSongsL(aMedia, aMessageArray); |
3718 //update all songes which associate with ABSTRACTALBUM |
|
3719 if (aMedia.IsSupported(KMPXMediaGeneralUri)) |
|
3720 { |
|
3721 //in case aMedia as mediaArray which contains songs as arrayContents, need to update all songs associated |
|
3722 if ( aMedia.IsSupported(KMPXMediaArrayContents)) |
|
3723 { |
|
3724 iDbHandler->UpdateSongsAbstractAlbumInfoL(aMedia, aMessageArray); |
|
3725 } |
|
3726 //only update field values in abstractalbum table, or renaming (change uri) for abstractalbum table |
|
3727 else |
|
3728 { |
|
3729 visibleChange = iDbHandler->UpdateAbstractAlbumL(aMedia, aMessageArray); |
|
3730 } |
|
3731 } |
3723 } |
3732 } |
3724 break; |
3733 break; |
3725 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
3734 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
3726 case EMPXSong: |
3735 case EMPXSong: |
3727 { |
3736 { |