Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42a9c537 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Include "album artist" when inserting items in the media provider."

parents 6d33c5ad abc28193
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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
+5 −1
Original line number Diff line number Diff line
@@ -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) {