|
|
@ -292,12 +292,12 @@ public class CoverArtController implements LastModified { |
|
|
|
try { |
|
|
|
try { |
|
|
|
LOG.trace("Reading artwork from file {}", mediaFile); |
|
|
|
LOG.trace("Reading artwork from file {}", mediaFile); |
|
|
|
artwork = jaudiotaggerParser.getArtwork(mediaFile); |
|
|
|
artwork = jaudiotaggerParser.getArtwork(mediaFile); |
|
|
|
|
|
|
|
is = new ByteArrayInputStream(artwork.getBinaryData()); |
|
|
|
|
|
|
|
mimeType = artwork.getMimeType(); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
LOG.debug("Could not read artwork from file {}", mediaFile); |
|
|
|
LOG.debug("Could not read artwork from file {}", mediaFile); |
|
|
|
throw new RuntimeException(e); |
|
|
|
throw new RuntimeException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
is = new ByteArrayInputStream(artwork.getBinaryData()); |
|
|
|
|
|
|
|
mimeType = artwork.getMimeType(); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
is = new FileInputStream(file); |
|
|
|
is = new FileInputStream(file); |
|
|
|
mimeType = StringUtil.getMimeType(FilenameUtils.getExtension(file.getName())); |
|
|
|
mimeType = StringUtil.getMimeType(FilenameUtils.getExtension(file.getName())); |
|
|
|