summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-05-03 10:40:22 +0200
committerhorchi <vdr@jwendel.de>2017-05-03 10:40:22 +0200
commit9e720f23bafea648ce3f7496c8369d90a553383d (patch)
tree46b9a5925052c82aae44476cc98b89bcc7ea1824
parentd848d70fdb1797ef102c638765bfe376c285e52b (diff)
downloadvdr-plugin-epg2vdr-9e720f23bafea648ce3f7496c8369d90a553383d.tar.gz
vdr-plugin-epg2vdr-9e720f23bafea648ce3f7496c8369d90a553383d.tar.bz2
fixed rouding problem for recording info
-rw-r--r--status.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/status.c b/status.c
index e58d641..7134468 100644
--- a/status.c
+++ b/status.c
@@ -182,7 +182,7 @@ void cUpdate::Recording(const cDevice* Device, const char* Name, const char* Fil
{
const cTimer* pendingTimer = 0;
int complete;
- int recFraction = 100;
+ double recFraction = 100.0;
long timerLengthSecs = rr->timer->StopTime() - rr->timer->StartTime();
bool vpsUsed = rr->timer->HasFlags(tfVps) && rr->timer->Event() && rr->timer->Event()->Vps();
@@ -230,10 +230,10 @@ void cUpdate::Recording(const cDevice* Device, const char* Name, const char* Fil
if (complete)
tell(1, "Info: Finished: '%s'; recorded %d%%; VPS %s",
- rr->timer->File(), recFraction, vpsUsed ? "Yes": "No");
+ rr->timer->File(), (int)round(recFraction), vpsUsed ? "Yes": "No");
else
tell(1, "Info: Finished: '%s' (not complete! - recorded only %d%%); VPS %s",
- rr->timer->File(), recFraction, vpsUsed ? "Yes": "No");
+ rr->timer->File(), (int)round(recFraction), vpsUsed ? "Yes": "No");
if (complete)
rr->lastBreak = 0; // reset break
@@ -245,7 +245,7 @@ void cUpdate::Recording(const cDevice* Device, const char* Name, const char* Fil
char* infoTxt;
asprintf(&infoTxt, "Recording '%s' finished - %s complete (%d%%)",
- rr->timer->File(), complete ? "" : "NOT", recFraction);
+ rr->timer->File(), complete ? "" : "NOT", (int)round(recFraction));
tell(1, "Info: %s", infoTxt);