diff --git a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStoreExtractor.kt b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStoreExtractor.kt index e0e989133..d0776e4a6 100644 --- a/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStoreExtractor.kt +++ b/app/src/main/java/org/oxycblt/auxio/music/fs/MediaStoreExtractor.kt @@ -283,7 +283,10 @@ private class MediaStoreExtractorImpl( // the file is not actually in the root internal storage directory. We can't do // anything to fix this, really. We also can't really filter it out, since how can we // know when it corresponds to the folder and not, say, Low Roar's breakout album "0"? - rawSong.albumName = cursor.getString(albumIndex) + // Also, on some devices it's literally just null. To maintain behavior sanity just + // replicate the majority behavior described prior. + rawSong.albumName = cursor.getStringOrNull(albumIndex) + ?: requireNotNull(rawSong.path?.name) { "Invalid raw: No path" } // Android does not make a non-existent artist tag null, it instead fills it in // as , which makes absolutely no sense given how other columns default // to null if they are not present. If this column is such, null it so that