Include "album artist" when inserting items in the media provider.
Change-Id: Ic34e2d54557409866dc35c29ee397afdfe874762
This commit is contained in:
@@ -869,6 +869,13 @@ public final class MediaStore {
|
||||
*/
|
||||
public static final String ARTIST = "artist";
|
||||
|
||||
/**
|
||||
* The artist credited for the album that contains the audio file
|
||||
* <P>Type: TEXT</P>
|
||||
* @hide
|
||||
*/
|
||||
public static final String ALBUM_ARTIST = "album_artist";
|
||||
|
||||
/**
|
||||
* A non human readable key calculated from the ARTIST, used for
|
||||
* searching, sorting and grouping
|
||||
|
||||
@@ -634,7 +634,11 @@ public class MediaScanner
|
||||
} else if (MediaFile.isImageFileType(mFileType)) {
|
||||
// FIXME - add DESCRIPTION
|
||||
} else if (MediaFile.isAudioFileType(mFileType)) {
|
||||
map.put(Audio.Media.ARTIST, (mArtist != null && mArtist.length() > 0 ? mArtist : MediaStore.UNKNOWN_STRING));
|
||||
String artist = mArtist != null && mArtist.length() > 0 ?
|
||||
mArtist : MediaStore.UNKNOWN_STRING;
|
||||
map.put(Audio.Media.ARTIST, artist);
|
||||
map.put(Audio.Media.ALBUM_ARTIST, mAlbumArtist != null &&
|
||||
mAlbumArtist.length() > 0 ? mAlbumArtist : artist);
|
||||
map.put(Audio.Media.ALBUM, (mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaStore.UNKNOWN_STRING));
|
||||
map.put(Audio.Media.COMPOSER, mComposer);
|
||||
if (mYear != 0) {
|
||||
|
||||
Reference in New Issue
Block a user