diff options
Diffstat (limited to 'src/github/daneren2005/dsub/service/RESTMusicService.java')
-rw-r--r-- | src/github/daneren2005/dsub/service/RESTMusicService.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/github/daneren2005/dsub/service/RESTMusicService.java b/src/github/daneren2005/dsub/service/RESTMusicService.java index 951a182d..c5438267 100644 --- a/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -654,17 +654,13 @@ public class RESTMusicService implements MusicService { } byte[] bytes = Util.toByteArray(in); - - File albumDir = FileUtil.getAlbumDirectory(context, entry); - if (albumDir.exists()) { - OutputStream out = null; - try { - out = new FileOutputStream(FileUtil.getAlbumArtFile(albumDir)); - out.write(bytes); - } finally { - Util.close(out); - } - } + OutputStream out = null; + try { + out = new FileOutputStream(FileUtil.getAlbumArtFile(context, entry)); + out.write(bytes); + } finally { + Util.close(out); + } bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); if(size != saveSize) { |