summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2011-01-29 17:52:27 +0100
committerDieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de>2011-01-29 17:52:27 +0100
commit8837aea4cc0f6f3c258631bddbc541696e70dc1c (patch)
tree2f7a0c12e8cc860f72a82aece7298035807c2b5d /pages
parent722a7aef8596b5b38f1bfbe34922832e941f0f82 (diff)
downloadvdr-plugin-live-8837aea4cc0f6f3c258631bddbc541696e70dc1c.tar.gz
vdr-plugin-live-8837aea4cc0f6f3c258631bddbc541696e70dc1c.tar.bz2
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
Diffstat (limited to 'pages')
-rw-r--r--pages/recordings.ecpp4
-rw-r--r--pages/setup.ecpp9
2 files changed, 11 insertions, 2 deletions
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<string, int>(day.length() - 1) + ".25em;");
- string duration(lexical_cast<string, int>(recItem->Duration()) + "'");
+ string duration(LiveSetup().GetShowRecDuration() ? "(" + lexical_cast<string, int>(recItem->Duration()) + "')" : "");
string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : "");
string hint(tr("Click to view details.")); if (!shortDescr.empty()) hint = shortDescr + "<br />" + hint;
</%cpp>
@@ -229,7 +229,7 @@ for (iter = recordingsTree->begin(path); iter != end; ++iter) {
<div class="recording_imgs"><%cpp> reply.out() << StringRepeat(level + 1, "<img src=\"img/transparent.png\" alt=\"\" width=\"16px\" height=\"16px\" />"); </%cpp><%cpp> if (!archived.empty()) { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "on_dvd.png") $>" alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { </%cpp><img src="<$ LiveSetup().GetThemedLink("img", "movie.png") $>" alt="movie" /><%cpp> } </%cpp></div>
<div class="recording_spec">
<div class="recording_day"><$ FormatDateTime(recFormatStr, startTime) $></div>
- <div class="recording_duration">(<$ duration $>)</div>
+ <div class="recording_duration"><$ duration $></div>
<div class="recording_name"><a <& tooltip.hint text=(hint) &><& tooltip.display domId=(id) &>><$ name $><br /><%cpp>if ((name != shortDescr) && (!shortDescr.empty())) {</%cpp><span><$ shortDescr $></span><%cpp> } else { </%cpp><span>&nbsp;</span><%cpp> } </%cpp></a></div>
</div>
<div class="recording_actions">
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" : "";
@@ -180,6 +183,12 @@ if (!cUser::CurrentUserHasRightTo(UR_EDITSETUP))
</td>
</tr>
<tr>
+ <td class="label leftcol"><div class="withmargin"><$ tr("Show duration in 'Recordings'") $>:</div></td>
+ <td class="rightcol">
+ <input type="checkbox" name="showRecDuration" id="showRecDuration" value="1" <%cpp> CHECKIF(!showRecDuration.empty()); </%cpp>/>
+ </td>
+ </tr>
+ <tr>
<td class="label leftcol"><div class="withmargin"><$ tr("Use ajax technology") $>:</div></td>
<td class="rightcol">
<input type="checkbox" name="useAjax" id="useAjax" value="1" <%cpp> CHECKIF(!useAjax.empty()); </%cpp> onclick="changeduseajax(this)"/>