summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de/bjusystems
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src/de/bjusystems')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java
index ea414a1..f2ad445 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java
@@ -32,6 +32,13 @@ public class Recording extends Event{
if(idx < words.length){
devInode = mapSpecialChars(words[idx++]);
}
+
+ if(idx < words.length) { //timer
+ String data = words[idx++];
+ if(data != null && data.length() > 0){
+ timerStopTime = new Date(Long.parseLong(data) * 1000L);
+ }
+ }
}
private String fileName;
@@ -44,6 +51,19 @@ public class Recording extends Event{
private String devInode = null;
+ /**
+ * If it is not null, recording is on going or will be on going until this date;
+ */
+ private Date timerStopTime = null;
+
+ public Date getTimerStopTime() {
+ return timerStopTime;
+ }
+
+ public void setTimerStopTime(Date timerStopTime) {
+ this.timerStopTime = timerStopTime;
+ }
+
public String getDevInode() {
return devInode;
}
@@ -61,6 +81,10 @@ public class Recording extends Event{
}
public long getDuration(){
+ if(timerStopTime != null){
+ return timerStopTime.getTime() - start.getTime();
+ }
+
if(realDuration != -1){
return realDuration;
}