1061 // ---------------------------------------------------------------------------- |
1061 // ---------------------------------------------------------------------------- |
1062 // CMPXDbAlbum::NeedToUpdateArt |
1062 // CMPXDbAlbum::NeedToUpdateArt |
1063 // ---------------------------------------------------------------------------- |
1063 // ---------------------------------------------------------------------------- |
1064 // |
1064 // |
1065 TBool CMPXDbAlbum::NeedToUpdateArt(const TDesC& aDeletedSongArt, const TDesC& aCurrentAlbumArt) |
1065 TBool CMPXDbAlbum::NeedToUpdateArt(const TDesC& aDeletedSongArt, const TDesC& aCurrentAlbumArt) |
1066 { |
1066 { |
1067 if (aDeletedSongArt.Length() == 0) |
1067 TBool needToUpdateArt = EFalse; |
1068 { |
1068 |
1069 // Deleted song's art has default album art |
|
1070 return EFalse; |
|
1071 } |
|
1072 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
1069 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
1073 else |
1070 TBool isNonEmbedded = EFalse; |
1074 if (aDeletedSongArt.Length() > 0) |
1071 if (aDeletedSongArt.Length() > 0) |
1075 { |
1072 { |
1076 TParsePtrC parse(aDeletedSongArt); |
1073 TParsePtrC parse(aDeletedSongArt); |
1077 TPtrC ext(parse.Ext()); |
1074 TPtrC ext(parse.Ext()); |
1078 //set flag to false, so .alb will not overwrite art field in album, artist table |
1075 //set flag to false, so .alb will not overwrite art field in album, artist table |
1079 // when song with embedded art |
1076 // when song with embedded art |
1080 if (ext.CompareF(KAbstractAlbumExt) == 0) |
1077 if (ext.CompareF(KAbstractAlbumExt) == 0) |
1081 { |
1078 { |
1082 // Deleted song's art is Non-embedded album art |
1079 // Deleted song's art is Non-embedded album art |
1083 return EFalse; |
1080 isNonEmbedded = ETrue; |
1084 } |
1081 } |
1085 } |
1082 } |
1086 else |
1083 if (!isNonEmbedded) |
1087 #endif |
1084 { |
1088 if (aDeletedSongArt.Length() > 0 && aCurrentAlbumArt.Length() > 0 && aDeletedSongArt.CompareF(aCurrentAlbumArt) == 0) |
1085 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
1089 { |
1086 if (aDeletedSongArt.Length() > 0 && aCurrentAlbumArt.Length() > 0 && aDeletedSongArt.CompareF(aCurrentAlbumArt) == 0) |
1090 // Deleted song's art is Embedded album art and it is the same as Album's current art |
1087 { |
1091 return ETrue; |
1088 // Deleted song's art is Embedded album art and it is the same as Album's current art |
1092 } |
1089 needToUpdateArt = ETrue; |
1093 else |
1090 } |
1094 { |
1091 #ifdef ABSTRACTAUDIOALBUM_INCLUDED |
1095 return EFalse; |
1092 } |
1096 } |
1093 #endif // ABSTRACTAUDIOALBUM_INCLUDED |
|
1094 return needToUpdateArt; |
1097 } |
1095 } |
1098 |
1096 |
1099 // ---------------------------------------------------------------------------- |
1097 // ---------------------------------------------------------------------------- |
1100 // CMPXDbAlbum::CreateTableL |
1098 // CMPXDbAlbum::CreateTableL |
1101 // ---------------------------------------------------------------------------- |
1099 // ---------------------------------------------------------------------------- |