Examples of CoverArtCache


Examples of com.pugh.sockso.cache.CoverArtCache

    @Override
    protected void setUp() {
        coverer = new NeuteredDefaultCoverer();
        coverer.setProperties( new StringProperties() );
        coverer.setLocale( new TestLocale() );
        coverer.coverCache = new CoverArtCache();
    }
View Full Code Here

Examples of com.pugh.sockso.cache.CoverArtCache

        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());
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.