summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-09-08 16:18:40 +0200
committerlouis <louis.braun@gmx.de>2013-09-08 16:18:40 +0200
commit1fba49cea7121c1942cef0bcccc0ba752f6b52e3 (patch)
treeb9fce8d9707e261558504f39f5db1d2a2605c965
parenta40698a2bacbe59c0c562c84eefebd1650214bc1 (diff)
downloadskin-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--HISTORY1
-rw-r--r--displaychannel.c3
-rw-r--r--menuitem.c9
3 files changed, 8 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index cc0643a..f21f264 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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"
diff --git a/menuitem.c b/menuitem.c
index 74faba2..d72be9d 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -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;