diff options
author | lado <herrlado@gmail.com> | 2013-03-14 11:25:06 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2013-03-14 11:25:06 +0100 |
commit | 56e8a8648027508341a020d4c200122e700c9028 (patch) | |
tree | e84448e105c69089fe7c0109266f13e3d1780f63 /vdrmanager | |
parent | 2260fcbbe892ccf5bcfce49e7fabd1d36023eab7 (diff) | |
download | vdr-manager-56e8a8648027508341a020d4c200122e700c9028.tar.gz vdr-manager-56e8a8648027508341a020d4c200122e700c9028.tar.bz2 |
deal with timerStopTime
Diffstat (limited to 'vdrmanager')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/data/Recording.java | 24 |
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; } |