diff options
Diffstat (limited to 'vdrmanager')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java | 12 |
1 files changed, 10 insertions, 2 deletions
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) { |