aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-14 15:24:56 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-14 15:24:56 -0500
commite9a5bb699e42d6d7aa166ab03a35bb64060828b4 (patch)
tree52789e15aea4e01a0bcc04dd495e4b6dfff8114e /MediaBrowser.Server.Implementations
parentf4b890f163cd3be5b399ef03be409106ab8ff60b (diff)
added recording progress bars
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
index ad9f769eb..55fa47ff7 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
@@ -231,6 +231,18 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}).ToList()
};
+ if (info.Status == RecordingStatus.InProgress)
+ {
+ var now = DateTime.UtcNow.Ticks;
+ var start = info.StartDate.Ticks;
+ var end = info.EndDate.Ticks;
+
+ var pct = now - start;
+ pct /= end;
+ pct *= 100;
+ dto.CompletionPercentage = pct;
+ }
+
var imageTag = GetImageTag(recording);
if (imageTag.HasValue)