summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--po/cs.po5
-rw-r--r--po/de.po5
-rw-r--r--po/es.po5
-rw-r--r--po/fi.po7
-rw-r--r--po/fr.po5
-rw-r--r--po/it.po5
-rw-r--r--po/nl.po5
-rw-r--r--po/ru.po5
-rw-r--r--po/vdradmin.pot5
-rw-r--r--template/default/prog_detail.html6
-rw-r--r--template/default/rec_list.html18
-rw-r--r--template/default/style.css13
-rwxr-xr-xvdradmind.pl40
14 files changed, 110 insertions, 15 deletions
diff --git a/HISTORY b/HISTORY
index 6fb7185..d0c6b4e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -16,6 +16,7 @@ VDR-Portal: amair
- Fixed: Non-localhost streamdev URL (Bug report #653, Ville Skytt).
- Added: Live TV streaming with Xineliboutput plugin (Ville Skytt).
- Improved: Adapt rename recording to Liemikuutio 1.32 (Ville Skytt).
+- Added: Show recording length in list and details with VDR >= 1.7.21 (Bug report #813, Ville Skytt).
2011-06-03: 3.6.8
- Updated: Dutch translation (Submitted by Roel Koelewijn).
diff --git a/po/cs.po b/po/cs.po
index cebe6f5..f248bbe 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: cs\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2006-09-23 13:14+0200\n"
"Last-Translator: Karel Borkovec <her-ur@her-ur.org>\n"
"Language-Team: Czech <cs@li.org>\n"
@@ -1314,6 +1314,9 @@ msgstr "Volno:"
msgid "Date"
msgstr "Datum"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "Celkem"
diff --git a/po/de.po b/po/de.po
index cf39912..f56a10c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM-3.6.5+cvs\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2009-12-30 19:31+0200\n"
"Last-Translator: Andreas Mair <mail@andreas.vdr-developer.org>\n"
"Language-Team: German <mail@andreas.vdr-developer.org>\n"
@@ -1224,6 +1224,9 @@ msgstr "Frei:"
msgid "Date"
msgstr "Datum"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "Gesamt"
diff --git a/po/es.po b/po/es.po
index 4e6650f..a999d8a 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM-3.6.6\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2010-02-11 22:46+0100\n"
"Last-Translator: Manuel Gomez <mgrojo@gmail.com>\n"
"Language-Team: Spanish <r_jung@web.de>\n"
@@ -1337,6 +1337,9 @@ msgstr "Espacio disponible:"
msgid "Date"
msgstr "Fecha"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "en total"
diff --git a/po/fi.po b/po/fi.po
index 6884b22..7cb3228 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM-3.6.2\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
-"PO-Revision-Date: 2011-07-30 23:22+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
+"PO-Revision-Date: 2011-11-18 22:15+0200\n"
"Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
"Language: fi\n"
@@ -1223,6 +1223,9 @@ msgstr "Vapaana:"
msgid "Date"
msgstr "Päivä"
+msgid "Length"
+msgstr "Kesto"
+
msgid "Total"
msgstr "kpl"
diff --git a/po/fr.po b/po/fr.po
index 81be5ec..39ba8a9 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM-3.6.0\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2007-08-23 10:45+0100\n"
"Last-Translator: Trois Six <trois.six@free.fr>\n"
"Language-Team: French <trois.six@free.fr>\n"
@@ -1245,6 +1245,9 @@ msgstr "Libre :"
msgid "Date"
msgstr "Date"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "Total"
diff --git a/po/it.po b/po/it.po
index 1c07df0..d644ca4 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM-3.6.6\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2010-03-29 01:02+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian <vdr-italian@tiscali.it>\n"
@@ -1226,6 +1226,9 @@ msgstr "Disponibile:"
msgid "Date"
msgstr "Data"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "Totale"
diff --git a/po/nl.po b/po/nl.po
index e5c2d65..a3686b6 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM-3.6.7\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2010-08-13 13:36+0200\n"
"Last-Translator: Roel Koelewijn <roel.koelewijn@gmail.com>\n"
"Language-Team: Dutch <nl@li.org>\n"
@@ -1227,6 +1227,9 @@ msgstr "Vrij:"
msgid "Date"
msgstr "Datum"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "Totaal"
diff --git a/po/ru.po b/po/ru.po
index d6beb99..efe10dd 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ru\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: 2006-10-27 15:42+0100\n"
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
"Language-Team: Russian <LL@li.org>\n"
@@ -1261,6 +1261,9 @@ msgstr "Свободно:"
msgid "Date"
msgstr "Дата"
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr "Всего"
diff --git a/po/vdradmin.pot b/po/vdradmin.pot
index 57714ff..4e28485 100644
--- a/po/vdradmin.pot
+++ b/po/vdradmin.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDRAdmin-AM 3.6.8\n"
"Report-Msgid-Bugs-To: Andreas Mair <andreas@vdr-developer.org>\n"
-"POT-Creation-Date: 2011-11-13 13:02+0200\n"
+"POT-Creation-Date: 2011-11-18 22:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1236,6 +1236,9 @@ msgstr ""
msgid "Date"
msgstr ""
+msgid "Length"
+msgstr ""
+
msgid "Total"
msgstr ""
diff --git a/template/default/prog_detail.html b/template/default/prog_detail.html
index d921c5b..949fc0c 100644
--- a/template/default/prog_detail.html
+++ b/template/default/prog_detail.html
@@ -63,6 +63,12 @@
<div class="epg_subtitle"><?% subtitle %?></div>
<?% END %?>
<div class="epg_summary"><?% text %?></div>
+ <?% IF length %?>
+ <div class="epg_length">
+ <h4><?% gettext('Length') %?>:</h4>&nbsp;
+ <?% length %?>
+ </div>
+ <?% END %?>
<?% IF video %?>
<div class="epg_video">
<h4><?% gettext('Video tracks:') %?></h4>&nbsp;
diff --git a/template/default/rec_list.html b/template/default/rec_list.html
index ed85ea0..ea388c3 100644
--- a/template/default/rec_list.html
+++ b/template/default/rec_list.html
@@ -74,6 +74,19 @@
</a>
</h2>
</td>
+ <?% IF features.VDRVERSION >= 10721 %?>
+ <td class="col_length <?% IF sortbylength %?>selected<?% END %?>">
+ <h2>
+ <a href="<?% sortbylengthurl %?>"><?% gettext('Length') %?>
+ <?% IF sortbylength %?>
+ <img src="bilder/sortiert_<?% desc %?>.gif" alt="" width="9" height="11" border="0" />
+ <?% ELSE %?>
+ <img src="bilder/spacer.gif" alt="" width="9" height="11" border="0" />
+ <?% END %?>
+ </a>
+ </h2>
+ </td>
+ <?% END %?>
<td class="col_name <?% IF sortbyname %?>selected<?% END %?>">
<h2>
<a href="<?% sortbynameurl %?>"><?% gettext('Name') %?>
@@ -101,6 +114,11 @@
<span class="new"><?% gettext('New') %?></span>
<?% END %?>
</td>
+ <?% IF features.VDRVERSION >= 10721 %?>
+ <td class="col_length <?% IF rec.sortbylength %?>selected<?% END %?>">
+ <span class="length"><?% rec.length %?></span>
+ </td>
+ <?% END %?>
<td class="col_name <?% IF rec.sortbyname %?>selected<?% END %?>">
<?% IF rec.isfolder %?>
<a href="<?% rec.infurl %?>"><img align="middle" src="bilder/folder_video.png" border="0" alt="" />&nbsp;<?% rec.name %?></a>
diff --git a/template/default/style.css b/template/default/style.css
index ad27dd1..68eebe3 100644
--- a/template/default/style.css
+++ b/template/default/style.css
@@ -203,7 +203,8 @@ body.help .heading {
.col_start,
.col_stop,
.col_date,
-.col_time {
+.col_time,
+.col_length {
padding-left: 3px;
padding-right: 3px;
white-space: nowrap;
@@ -405,14 +406,16 @@ body.help .heading {
display: block;
}
#prog_detail .epg_video h4,
-#prog_detail .epg_audio h4 {
+#prog_detail .epg_audio h4,
+#prog_detail .epg_length h4 {
margin: 0;
font-size: 10px;
font-weight: bold;
display: inline;
}
#prog_detail .epg_video h5,
-#prog_detail .epg_audio h5 {
+#prog_detail .epg_audio h5,
+#prog_detail .epg_length h5 {
margin-left: 1em;
display: inline;
font-size: 10px;
@@ -479,6 +482,10 @@ body.help .heading {
width: 76px;
text-align: left;
}
+.col_length {
+ width: 76px;
+ text-align: right;
+}
.col_edit,
.col_delete,
.col_stream,
diff --git a/vdradmind.pl b/vdradmind.pl
index 696ccf2..d08c403 100755
--- a/vdradmind.pl
+++ b/vdradmind.pl
@@ -5988,6 +5988,18 @@ sub rec_list {
lc($b->{isfolder} ? $a->{name} : "") cmp lc($a->{isfolder} ? $b->{name} : "") ||
$a->{sse} <=> $b->{sse} } @recordings);
}
+ } elsif ($CONFIG{REC_SORTBY} eq "length") {
+ if ($CONFIG{REC_DESC}) {
+ @recordings = sort({ $b->{isfolder} <=> $a->{isfolder} ||
+ $b->{lengthmin} <=> $a->{lengthmin} ||
+ lc($b->{isfolder} ? $a->{name} : "") cmp lc($a->{isfolder} ? $b->{name} : "")
+ } @recordings);
+ } else {
+ @recordings = sort({ $b->{isfolder} <=> $a->{isfolder} ||
+ $a->{lengthmin} <=> $b->{lengthmin} ||
+ lc($b->{isfolder} ? $a->{name} : "") cmp lc($a->{isfolder} ? $b->{name} : "")
+ } @recordings);
+ }
}
my $toggle_desc = ($CONFIG{REC_DESC} ? 0 : 1);
@@ -5999,9 +6011,11 @@ sub rec_list {
my $vars = { recloop => \@recordings,
sortbydateurl => "$MyURL?aktion=rec_list&amp;parent=$parent&amp;sortby=date&amp;parent=$parent&amp;desc=" . (($CONFIG{REC_SORTBY} eq "date") ? $toggle_desc : $CONFIG{REC_DESC}),
sortbytimeurl => "$MyURL?aktion=rec_list&amp;parent=$parent&amp;sortby=time&amp;parent=$parent&amp;desc=" . (($CONFIG{REC_SORTBY} eq "time") ? $toggle_desc : $CONFIG{REC_DESC}),
+ sortbylengthurl => "$MyURL?aktion=rec_list&amp;parent=$parent&amp;sortby=length&amp;parent=$parent&amp;desc=" . (($CONFIG{REC_SORTBY} eq "length") ? $toggle_desc : $CONFIG{REC_DESC}),
sortbynameurl => "$MyURL?aktion=rec_list&amp;parent=$parent&amp;sortby=name&amp;parent=$parent&amp;desc=" . (($CONFIG{REC_SORTBY} eq "name") ? $toggle_desc : $CONFIG{REC_DESC}),
sortbydate => ($CONFIG{REC_SORTBY} eq "date") ? 1 : 0,
sortbytime => ($CONFIG{REC_SORTBY} eq "time") ? 1 : 0,
+ sortbylength => ($CONFIG{REC_SORTBY} eq "length") ? 1 : 0,
sortbyname => ($CONFIG{REC_SORTBY} eq "name") ? 1 : 0,
desc => $CONFIG{REC_DESC} ? "desc" : "asc",
disk_total => $total,
@@ -6128,6 +6142,7 @@ sub ParseRecordings {
isfolder => 1,
date => 0,
time => 0,
+ lengthmin => 0,
infurl => sprintf("%s?aktion=rec_list&amp;parent=%s", $MyURL, $recording_id)
}
);
@@ -6159,6 +6174,13 @@ sub ParseRecordings {
}
} # endif
+ my $lengthmin = 0;
+ if ($length =~ /^(\d+):(\d{1,2})$/) {
+ $lengthmin = $1 * 60 + $2;
+ } elsif ($length =~ /^\d+/) {
+ $lengthmin = $length;
+ }
+
my $name_js = $name;
$name_js =~ s/\'/\\\'/g;
$name_js =~ s/\"/\&quot;/g;
@@ -6166,6 +6188,8 @@ sub ParseRecordings {
{ sse => timelocal(undef, substr($time, 3, 2), substr($time, 0, 2), substr($date, 0, 2), (substr($date, 3, 2) - 1), $yearofrecording),
date => $date,
time => $time,
+ length => $length,
+ lengthmin => $lengthmin,
name => CGI::escapeHTML($name),
name_js => $name_js,
serie => $serie,
@@ -6185,6 +6209,10 @@ sub ParseRecordings {
}
countRecordings(0);
+ for (@RECORDINGS) {
+ $_->{length} ||=
+ sprintf("%d:%02d", $_->{lengthmin} / 60, $_->{lengthmin} % 60);
+ }
$CONFIG{CACHE_REC_LASTUPDATE} = time();
}
@@ -6200,10 +6228,12 @@ sub countRecordings {
if ($folder) {
$folder->{date} += $_->{date};
$folder->{time} += $_->{time} if ($_->{time});
+ $folder->{lengthmin} += $_->{lengthmin};
}
} elsif ($folder) {
$folder->{date}++;
$folder->{time}++ if ($_->{new});
+ $folder->{lengthmin} += $_->{lengthmin};
}
}
}
@@ -6214,12 +6244,17 @@ sub getRecInfo {
my $ref = shift;
my $rename = shift;
- my ($i, $title);
+ my ($i, $length, $title);
for (SendCMD("lstr")) {
- ($i, undef, undef, $title) = split(/ +/, $_, 4);
+ if ($FEATURES{VDRVERSION} < 10721) {
+ ($i, undef, undef, $title) = split(/ +/, $_, 4);
+ } else {
+ ($i, undef, undef, $length, $title) = split(/ +/, $_, 5);
+ }
last if ($id == $i);
}
chomp($title);
+ $length =~ s/\*+$//;
my $vars;
if ($FEATURES{VDRVERSION} >= 10325) {
@@ -6287,6 +6322,7 @@ sub getRecInfo {
id => $id,
video => $video,
audio => $audio,
+ length => $length,
referer => $ref || undef
};
} else {