driver/record.cpp: add record duration to stop menu

This commit is contained in:
[CST] Focus
2013-04-04 14:06:43 +04:00
parent e09bc260da
commit 1c2f2a5750

View File

@@ -676,7 +676,10 @@ void CRecordInstance::GetRecordString(std::string &str)
char stime[15];
int err = GetStatus();
strftime(stime, sizeof(stime), "%H:%M:%S ", localtime(&start_time));
str = stime + channel->getName() + ": " + GetEpgTitle() + ((err & REC_STATUS_OVERFLOW) ? " [!]" : "");
time_t duration = time(0) - start_time;
char dtime[15];
snprintf(dtime, sizeof(dtime), " (%02d:%02d)", (int) duration/3600, (int) duration/60);
str = stime + channel->getName() + ": " + GetEpgTitle() + ((err & REC_STATUS_OVERFLOW) ? " [!]" : "") + dtime;
}
//-------------------------------------------------------------------------