diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 38bcc31826e..149da72d7f0 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -21,6 +21,10 @@ * Video: * Text: * Metadata: + * Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort' + (`soal`), 'artist sort' (`soar`) and 'album artist sort' (`soaa`) MP4 + tags were wrongly mapped to the `TSO2`, `TSOA` and `TSOP` ID3 tags + ([#1302](https://github.com/androidx/media/issues/1302)). * Image: * DRM: * Allow setting a `LoadErrorHandlingPolicy` on diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/MetadataUtil.java b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/MetadataUtil.java index 01e570fa7bf..6ec81e6840a 100644 --- a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/MetadataUtil.java +++ b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/MetadataUtil.java @@ -387,11 +387,11 @@ public static Metadata.Entry parseIlstElement(ParsableByteArray ilst) { } else if (type == TYPE_SORT_TRACK_NAME) { return parseTextAttribute(type, "TSOT", ilst); } else if (type == TYPE_SORT_ALBUM) { - return parseTextAttribute(type, "TSO2", ilst); - } else if (type == TYPE_SORT_ARTIST) { return parseTextAttribute(type, "TSOA", ilst); - } else if (type == TYPE_SORT_ALBUM_ARTIST) { + } else if (type == TYPE_SORT_ARTIST) { return parseTextAttribute(type, "TSOP", ilst); + } else if (type == TYPE_SORT_ALBUM_ARTIST) { + return parseTextAttribute(type, "TSO2", ilst); } else if (type == TYPE_SORT_COMPOSER) { return parseTextAttribute(type, "TSOC", ilst); } else if (type == TYPE_RATING) {