Fix error when program duration from ziggogids is not an integer
authorJan-Pascal van Best <janpascal@vanbest.org>
Thu, 2 Jan 2014 21:31:59 +0000 (22:31 +0100)
committerJan-Pascal van Best <janpascal@vanbest.org>
Thu, 2 Jan 2014 21:31:59 +0000 (22:31 +0100)
src/main/java/org/vanbest/xmltv/ZiggoGids.java

index 89bc9a148ddf2cd5cd33b01e95bbeb5eacb5ef12..65ace76eb4ab58f5f277ca2d3566e8757feeefa7 100644 (file)
@@ -285,8 +285,8 @@ public class ZiggoGids extends AbstractEPGSource implements EPGSource {
                 stats.cacheHits++;
             }
             p.startTime = new Date(1000L*start);
-            long duration = Integer.parseInt(item.attr("pr-duration")); // minutes
-            p.endTime = new Date(1000L*(start+60*duration));
+            double duration = Double.parseDouble(item.attr("pr-duration")); // minutes
+            p.endTime = new Date(1000L*Math.round(start+60*duration));
             if (config.fetchDetails && ( !cached || !p.hasDescription() ) ) {
                 fillDetails(httpclient, p, progid);
             }