From c627b7432d23db7ebe090e7a4027c0267c19434e Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Mon, 5 Sep 2011 23:32:52 +0200 Subject: Support for native recording length since VDR 1.7.21: Applying a patch provided by ROFA: As the new vdr-1.7.21 provides native interface for recording lenght, there's no need to keep the "Show duration in 'Recordings'" setting anymore - less the options the better. If users want to speed up the recordings page, they must just upgrade to vdr-1.7.21+. --- tools.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools.cpp') diff --git a/tools.cpp b/tools.cpp index 2057c48..c744d06 100644 --- a/tools.cpp +++ b/tools.cpp @@ -51,12 +51,12 @@ istream& operator>>( istream& is, tChannelID& ret ) namespace vdrlive { - string FormatDuration( char const* format, int duration ) + string FormatDuration( char const* format, int hours, int minutes ) { char result[ 32 ]; - if ( snprintf(result, sizeof(result), format, duration) < 0 ) { + if ( snprintf(result, sizeof(result), format, hours, minutes) < 0 ) { ostringstream builder; - builder << "cannot represent duration " << duration << " as requested"; + builder << "cannot represent duration " << hours << ":" << minutes << " as requested"; throw runtime_error( builder.str() ); } return result; -- cgit v1.2.3