summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2011-09-05 23:32:52 +0200
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2011-09-05 23:32:52 +0200
commitc627b7432d23db7ebe090e7a4027c0267c19434e (patch)
tree48d9b44ae1565928c05c67797c7c74c0906c79a1 /tools.cpp
parentc54f41fc59899a0f59b45bc500e99a080a12e2ac (diff)
downloadvdr-plugin-live-c627b7432d23db7ebe090e7a4027c0267c19434e.tar.gz
vdr-plugin-live-c627b7432d23db7ebe090e7a4027c0267c19434e.tar.bz2
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+.
Diffstat (limited to 'tools.cpp')
-rw-r--r--tools.cpp6
1 files changed, 3 insertions, 3 deletions
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;