From 897208ed933e1fc39afd9b2f5b1e2df18f84a334 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 12 Jul 2014 21:57:46 -0700 Subject: MediaStoreService is saving wrong contentType --- src/github/daneren2005/dsub/service/MediaStoreService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/service/MediaStoreService.java b/src/github/daneren2005/dsub/service/MediaStoreService.java index c1935ddc..d38a5686 100644 --- a/src/github/daneren2005/dsub/service/MediaStoreService.java +++ b/src/github/daneren2005/dsub/service/MediaStoreService.java @@ -57,7 +57,11 @@ public class MediaStoreService { values.put(MediaStore.Audio.AudioColumns.ARTIST, song.getArtist()); values.put(MediaStore.Audio.AudioColumns.ALBUM, song.getAlbum()); values.put(MediaStore.MediaColumns.DATA, songFile.getAbsolutePath()); - values.put(MediaStore.MediaColumns.MIME_TYPE, song.getContentType()); + if(song.getTranscodedContentType() != null) { + values.put(MediaStore.MediaColumns.MIME_TYPE, song.getTranscodedContentType()); + } else { + values.put(MediaStore.MediaColumns.MIME_TYPE, song.getContentType()); + } if(song.getDuration() != null) { values.put(MediaStore.Audio.AudioColumns.DURATION, song.getDuration() * 1000L); } -- cgit v1.2.3