From: <jbo...@li...> - 2006-01-09 15:21:13
|
Author: wrzep Date: 2006-01-09 10:21:07 -0500 (Mon, 09 Jan 2006) New Revision: 2041 Modified: trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java Log: final version http://jira.jboss.com/jira/browse/JBLAB-540 Pawel Modified: trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java =================================================================== --- trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java 2006-01-09 14:25:46 UTC (rev 2040) +++ trunk/forge/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java 2006-01-09 15:21:07 UTC (rev 2041) @@ -31,6 +31,7 @@ import java.util.Date; import java.text.DateFormat; +import java.text.DecimalFormat; import java.util.SimpleTimeZone; import java.net.URL; @@ -187,7 +188,6 @@ if ((image == null) || (image.length() == 0)) { image = item.getAttributeValue("itunes:image", "href"); - System.out.println("item itunes:image" + image); } if ((image != null) && (image.length() != 0)) { @@ -218,7 +218,10 @@ if (enclosureLocation != null) { nodeContext.put("enclosure-link", enclosureLocation.toString()); nodeContext.put("enclosure-type", enclosure.getType()); - nodeContext.put("enclosure-size", Math.round(enclosure.getLength() / BYTES_IN_MB)); + + DecimalFormat decimaFormat = new DecimalFormat("##.#"); + String size = decimaFormat.format(((float)enclosure.getLength() / (float)BYTES_IN_MB)); + nodeContext.put("enclosure-size", size); } } @@ -259,7 +262,6 @@ if ((image == null) || (image.length() == 0)) { image = channel.getAttributeValue("itunes:image", "href"); - System.out.println("itunes:image href=" + image); } if ((image != null) && (image.length() != 0)) { |