1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed wrongfully displaying the length of a recording in the title of the replay progress display

This commit is contained in:
Klaus Schmidinger 2012-01-15 11:12:58 +01:00
parent 81f349bf58
commit c36c65416e
2 changed files with 15 additions and 6 deletions

View File

@ -6781,7 +6781,7 @@ Video Disk Recorder Revision History
- Replaced all calls to sleep() with cCondWait::SleepMs() (thanks to Rolf Ahrenberg). - Replaced all calls to sleep() with cCondWait::SleepMs() (thanks to Rolf Ahrenberg).
- Fixed a crash with malformed SI data (patch from vdr-portal). - Fixed a crash with malformed SI data (patch from vdr-portal).
2012-01-14: Version 1.7.23 2012-01-15: Version 1.7.23
- Removed the '.pl' suffix from svdrpsend.pl (sorry, I missed that one). - Removed the '.pl' suffix from svdrpsend.pl (sorry, I missed that one).
- Fixed bonding more than two devices. - Fixed bonding more than two devices.
@ -6831,3 +6831,5 @@ Video Disk Recorder Revision History
- The new setup option "Replay/Show remaining time" can be used to switch between - The new setup option "Replay/Show remaining time" can be used to switch between
showing the total length or the remaining time of the recording that is currently showing the total length or the remaining time of the recording that is currently
replayed. replayed.
- Fixed wrongfully displaying the length of a recording in the title of the replay
progress display.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recording.c 2.42 2012/01/14 12:50:58 kls Exp $ * $Id: recording.c 2.43 2012/01/15 11:04:24 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -873,16 +873,23 @@ const char *cRecording::Title(char Delimiter, bool NewIndicator, int Level) cons
s++; s++;
else else
s = name; s = name;
titleBuffer = strdup(cString::sprintf("%02d.%02d.%02d%c%02d:%02d%c%d:%02d%c%c%s", cString Length("");
if (NewIndicator) {
int Seconds = max(0, LengthInSeconds());
Length = cString::sprintf("%c%d:%02d",
Delimiter,
Seconds / 3600,
Seconds / 60 % 60
);
}
titleBuffer = strdup(cString::sprintf("%02d.%02d.%02d%c%02d:%02d%s%c%c%s",
t->tm_mday, t->tm_mday,
t->tm_mon + 1, t->tm_mon + 1,
t->tm_year % 100, t->tm_year % 100,
Delimiter, Delimiter,
t->tm_hour, t->tm_hour,
t->tm_min, t->tm_min,
Delimiter, *Length,
(LengthInSeconds() >= 0) ? LengthInSeconds() / 3600 : 0,
(LengthInSeconds() >= 0) ? LengthInSeconds() / 60 % 60 : 0,
New, New,
Delimiter, Delimiter,
s)); s));