Skip to content

Commit b29cd9b

Browse files
committed
fix: Other artwork classification not being saved
- Encountered an issue w/ `.flac` files where Mp3tag show the artwork as `Other` but Media3 had `artworkDataType = -1` instead of `0`. - In the implementation where we get the `base64` image, the mimeType for the artwork in this `.flac` file was `audio/wav` for whatever reason, which probably explains why we got `-1`.
1 parent 5fe5c65 commit b29cd9b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
77

88
## [Unreleased]
99

10+
### 🛠️ Fixes
11+
12+
- `Other` artwork classification not being saved.
13+
- Encountered a `.flac` file whose artwork was classified as `Other` but had `artworkDataType = -1`.
14+
1015
## [2.1.0] - 2025-09-29
1116

1217
### 🛠️ Fixes

android/src/main/java/com/cyanchill/missingcore/metadataretriever/modules/MetadataRetrieverModule.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ class MetadataRetrieverModule internal constructor(reactContext: ReactApplicatio
194194

195195
when (mediaMetadata.artworkDataType) {
196196
// "Other" Picture Type
197-
MediaMetadata.PICTURE_TYPE_OTHER -> {
197+
MediaMetadata.PICTURE_TYPE_OTHER,
198+
// Sometimes "Other" Picture Type is set to `-1` (encountered with a `.flac` file)
199+
-1 -> {
198200
if (backupImage == null || backupImageCode == 1) {
199201
val newImg = if (asBase64) reader.getBase64Image(mediaMetadata.artworkData) else mediaMetadata.artworkData
200202
if (newImg !== null) {

0 commit comments

Comments
 (0)