diff options
author | louis <louis.braun@gmx.de> | 2013-09-08 16:18:40 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-08 16:18:40 +0200 |
commit | 1fba49cea7121c1942cef0bcccc0ba752f6b52e3 (patch) | |
tree | b9fce8d9707e261558504f39f5db1d2a2605c965 | |
parent | a40698a2bacbe59c0c562c84eefebd1650214bc1 (diff) | |
download | skin-nopacity-1fba49cea7121c1942cef0bcccc0ba752f6b52e3.tar.gz skin-nopacity-1fba49cea7121c1942cef0bcccc0ba752f6b52e3.tar.bz2 |
Display correct recording date even if recording info is empty (closes Bug 1448)
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | displaychannel.c | 3 | ||||
-rw-r--r-- | menuitem.c | 9 |
3 files changed, 8 insertions, 5 deletions
@@ -236,3 +236,4 @@ Version 0.1.4 is available - Added Deadlock Patch - Changed default Channelseparator Icon (closes Bug 1412) +- Display correct recording date even if recording info is empty (closes Bug 1448) diff --git a/displaychannel.c b/displaychannel.c index df54200..77bf517 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -1,6 +1,3 @@ - #include "symbols/audio.xpm" -#include "symbols/dolbydigital.xpm" - #include "displaychannel.h" #include "services/tvscraper.h" @@ -1159,9 +1159,14 @@ void cNopacityRecordingMenuItem::DrawRecDateTime(void) { cString strDateTime(""); cString strDuration(""); if (Event) { - cString strDate = Event->GetDateString(); + std::string strDate = *(Event->GetDateString()); cString strTime = Event->GetTimeString(); - strDateTime = cString::sprintf("%s - %s", *strDate, *strTime); + if (strDate.find("1970") != std::string::npos) { + time_t start = Recording->Start(); + strDateTime = cString::sprintf("%s %s", *DateString(start),*TimeString(start)); + } else { + strDateTime = cString::sprintf("%s - %s", strDate.c_str(), *strTime); + } int duration = Event->Duration() / 60; int recDuration = Recording->LengthInSeconds(); recDuration = (recDuration>0)?(recDuration / 60):0; |