From 2a307c36a2d762856423c8186b33495040a07683 Mon Sep 17 00:00:00 2001 From: lado Date: Thu, 14 Mar 2013 11:26:19 +0100 Subject: timerStopTime --- vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'vdrmanager/src') diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java index dd66e8c..2b30fc6 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java @@ -93,7 +93,15 @@ public class Utils { } public static int getProgress(Event e) { - return getProgress(e.getStart(), e.getStop()); + if(e instanceof Recording == false){ + return getProgress(e.getStart(), e.getStop()); + } + Recording r = ((Recording)e); + if(r.getTimerStopTime() == null){ + return getProgress(e.getStart(), e.getStop()); + } + return getProgress(r.getStart(), r.getTimerStopTime()); + } /** @@ -114,7 +122,7 @@ public class Utils { public static boolean isLive(Event event) { long now = System.currentTimeMillis(); return now >= event.getStart().getTime() - && now < event.getStop().getTime(); + && now <= event.getStop().getTime(); } private static String trimToEmpty(String str) { -- cgit v1.2.3