From c1bf83aec2961a4e84dbc1c36042bd985f044a91 Mon Sep 17 00:00:00 2001 From: Andreas Brugger Date: Sat, 4 Feb 2006 11:49:02 +0100 Subject: 2006-02-04: Version 1.1-cvs_ext-0.7 (vdr-text2skin-1.1-cvs_ext-0.7.diff) - changed the routines to determine the next timers - added the possibility to have a scrollbar in every menu - not fully implemented yet (to position in menu-lists is not necessarily correct, if there are more items with the same osd-text) --- common.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'common.c') diff --git a/common.c b/common.c index 904c417..b9e1daf 100644 --- a/common.c +++ b/common.c @@ -121,6 +121,14 @@ const cRecording *GetRecordingByFileName(const char *FileName) } int GetRecordingSize(const char *FileName) +#if VDRVERSNUM >= 10338 +// use VDR's routine +{ + const cRecording *rec = GetRecordingByFileName(FileName); + return (rec) ? DirSizeMB(FileName) : 0; +} +#else +// use our own approach { if (FileName != NULL) { bool bRet=false; @@ -165,6 +173,7 @@ int GetRecordingSize(const char *FileName) return 0; } } +#endif int GetRecordingLength(const char *FileName) { @@ -217,27 +226,9 @@ int GetRecordingCuttedLength(const char *FileName) double length = 0; int totalLength = GetRecordingLength(FileName); const double diffIFrame = FRAMESPERSEC / 2; // approx. 1/2 sec. - /* - // not useful - static std::string lastFileName = ""; - static uint64 nextUpdate = 0; - static int totalLength = 0; - const uint64 bufferTime = 30 * 1000; // [ms] - */ - marks.Load(FileName); - /* - // buffer the result of 'GetRecordingLength' - if (FileName != lastFileName || time_ms() >= nextUpdate) - { - lastFileName = FileName; - nextUpdate = time_ms() + bufferTime; - totalLength = GetRecordingLength(FileName); - } - */ - if (marks.Count()) { int start = 1; // first frame -- cgit v1.2.3