From 8837aea4cc0f6f3c258631bddbc541696e70dc1c Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Sat, 29 Jan 2011 17:52:27 +0100 Subject: Applied patch supplied by Rolf Ahrenberg to omit recordings durations. This helps in scanning large amounts of recordings, because not for every recoding a file is scanned for either its size or the length.vdr file. The patch (live-git-20110129-showrecduration.patch.gz) was submitted on vdr-portal.de in the post: http://www.vdr-portal.de/board/thread.php?postid=974612#post974612 --- pages/recordings.ecpp | 4 ++-- pages/setup.ecpp | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'pages') diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 801435f..b5272b9 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -141,7 +141,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) { if (!recItem->IsDir()) { string day(FormatDateTime("%a,", recItem->StartTime())); string dayLen(lexical_cast(day.length() - 1) + ".25em;"); - string duration(lexical_cast(recItem->Duration()) + "'"); + string duration(LiveSetup().GetShowRecDuration() ? "(" + lexical_cast(recItem->Duration()) + "')" : ""); string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); string hint(tr("Click to view details.")); if (!shortDescr.empty()) hint = shortDescr + "
" + hint; @@ -229,7 +229,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
<%cpp> reply.out() << StringRepeat(level + 1, "\"\""); <%cpp> if (!archived.empty()) { " alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { " alt="movie" /><%cpp> }
diff --git a/pages/setup.ecpp b/pages/setup.ecpp index b59d1bb..e62d821 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -21,6 +21,7 @@ using namespace std; string startscreen; string theme; string localnetmask; + string showRecDuration; string showLogo; string useAjax; string showInfoBox; @@ -64,6 +65,7 @@ if (!cUser::CurrentUserHasRightTo(UR_EDITSETUP)) LiveSetup().SetScheduleDuration(scheduleDuration); LiveSetup().SetStartScreen(startscreen); LiveSetup().SetTheme(theme); + LiveSetup().SetShowRecDuration(!showRecDuration.empty()); LiveSetup().SetShowLogo(!showLogo.empty()); LiveSetup().SetUseAjax(!useAjax.empty()); if (LiveSetup().GetUseAjax()) { @@ -94,6 +96,7 @@ if (!cUser::CurrentUserHasRightTo(UR_EDITSETUP)) startscreen = LiveSetup().GetStartScreen(); theme = LiveSetup().GetTheme(); localnetmask = LiveSetup().GetLocalNetMask(); + showRecDuration = LiveSetup().GetShowRecDuration() ? "1" : ""; showLogo = LiveSetup().GetShowLogo() ? "1" : ""; useAjax = LiveSetup().GetUseAjax() ? "1" : ""; showInfoBox = LiveSetup().GetShowInfoBox() ? "1" : ""; @@ -179,6 +182,12 @@ if (!cUser::CurrentUserHasRightTo(UR_EDITSETUP)) CHECKIF(!showLogo.empty()); /> + +
<$ tr("Show duration in 'Recordings'") $>:
+ + CHECKIF(!showRecDuration.empty()); /> + +
<$ tr("Use ajax technology") $>:
-- cgit v1.2.3