diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-07-12 21:57:46 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-07-12 21:57:46 -0700 |
commit | 897208ed933e1fc39afd9b2f5b1e2df18f84a334 (patch) | |
tree | 2adfb50d5398ea4645d1510b58a2963f20ec2eb1 /src | |
parent | 158f535e80755ec5c2f58e506548bd44e74d1ab0 (diff) | |
download | dsub-897208ed933e1fc39afd9b2f5b1e2df18f84a334.tar.gz dsub-897208ed933e1fc39afd9b2f5b1e2df18f84a334.tar.bz2 dsub-897208ed933e1fc39afd9b2f5b1e2df18f84a334.zip |
MediaStoreService is saving wrong contentType
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/service/MediaStoreService.java | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |