this.p = properties;
}
public void indexCover(final CoverArt coverArt) {
CoverArtCache coverCache = new CoverArtCache();
// Check if the cover art has already been cached
if (!coverCache.isCached(coverArt.getItemName())) {
// Found a cover, now let's resize it
coverArt.scale((int) p.get(Constants.DEFAULT_ARTWORK_WIDTH, 115),
(int) p.get(Constants.DEFAULT_ARTWORK_HEIGHT, 115));
// Now let's cache it
String imgExt = p.get(Constants.DEFAULT_ARTWORK_TYPE, "jpg");
try {
coverCache.addToCache(coverArt);
} catch (CacheException e) {
log.error("Could not create cover image file " + coverArt.getItemName() + ": " + e.getMessage());
}
}
}