diff options
| author | Daniel Matzke <post@danielmatzke.de> | 2012-07-09 12:25:44 +0200 | 
|---|---|---|
| committer | Andreas Mair <amair.sob@googlemail.com> | 2012-07-09 12:25:44 +0200 | 
| commit | fe3ccba5142e58e569fe6549ae36b344bc6b0f00 (patch) | |
| tree | e59af1fba6153716d3be0377b362e5eb1e68a288 | |
| parent | 1d074b59732383073cd8cfcfe995d1aa92b586f8 (diff) | |
| download | vdradmin-am-fe3ccba5142e58e569fe6549ae36b344bc6b0f00.tar.gz vdradmin-am-fe3ccba5142e58e569fe6549ae36b344bc6b0f00.tar.bz2 | |
Added streaming of recordings folders.
| -rw-r--r-- | HISTORY | 1 | ||||
| -rw-r--r-- | po/cs.po | 5 | ||||
| -rw-r--r-- | po/de.po | 5 | ||||
| -rw-r--r-- | po/es.po | 5 | ||||
| -rw-r--r-- | po/fi.po | 5 | ||||
| -rw-r--r-- | po/fr.po | 5 | ||||
| -rw-r--r-- | po/hu.po | 27 | ||||
| -rw-r--r-- | po/it.po | 24 | ||||
| -rw-r--r-- | po/nl.po | 5 | ||||
| -rw-r--r-- | po/ru.po | 5 | ||||
| -rw-r--r-- | po/vdradmin.pot | 5 | ||||
| -rw-r--r-- | template/default/rec_list.html | 12 | ||||
| -rwxr-xr-x | vdradmind.pl | 69 | 
13 files changed, 131 insertions, 42 deletions
| @@ -1,4 +1,5 @@  20xx-xx-xx: x.x.x +- Added: streaming of recordings folders (Submitted by Daniel Matzke).  - Added: Hungarian translation (Submitted by Istvn Fley).  - Fixed LSTR when executing recording commands on VDR >= 1.7.21 (Submitted by David Rtti)  - Updated: Italian translation (thanks to Diego Pierotto). @@ -7,7 +7,7 @@ msgid ""  msgstr ""  "Project-Id-Version: cs\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-18 23:43+0200\n"  "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"  "Language-Team: Czech <cs@li.org>\n" @@ -1347,6 +1347,9 @@ msgstr "Příkazy:"  msgid "Really run this command?"  msgstr "Opravdu spustit tento příkaz?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Smazat označené nahrávky" @@ -7,7 +7,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM-3.6.9\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-19 08:55+0100\n"  "Last-Translator: Andreas Mair <amair.sob@googlemail.com>\n"  "Language-Team: German <amair.sob@googlemail.com>\n" @@ -1257,6 +1257,9 @@ msgstr "Befehle:"  msgid "Really run this command?"  msgstr "Diesen Befehl wirklich ausführen?" +msgid "stream all recordings" +msgstr "Alle Aufnahmen streamen" +  msgid "Delete Selected Recordings"  msgstr "Ausgewählte Aufnahmen löschen" @@ -7,7 +7,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM-3.6.6\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-18 23:42+0200\n"  "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"  "Language-Team: Spanish <r_jung@web.de>\n" @@ -1370,6 +1370,9 @@ msgstr "Órdenes:"  msgid "Really run this command?"  msgstr "¿Ejecutar la orden de verdad?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Borrar grabaciones elegidas" @@ -8,7 +8,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM-3.6.2\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-18 23:36+0200\n"  "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"  "Language-Team: Finnish <vdr@linuxtv.org>\n" @@ -1256,6 +1256,9 @@ msgstr "Komennot:"  msgid "Really run this command?"  msgstr "Suoritetaanko komento?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Poista valitut tallenteet" @@ -7,7 +7,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM-3.6.0\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-18 23:42+0200\n"  "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"  "Language-Team: French <trois.six@free.fr>\n" @@ -1278,6 +1278,9 @@ msgstr "Commandes :"  msgid "Really run this command?"  msgstr "Voulez-vous réellement exécuter cette commande ?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Supprimer Enregistrements Sélectionnés" @@ -20,7 +20,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM 3.6.8\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-11-19 09:08+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-12-07 12:42+0200\n"  "Last-Translator: Füley István <ifuley at tigercomp dot ro>\n"  "Language-Team: Hungarian <ifuley at tigercomp dot ro>\n" @@ -77,6 +77,9 @@ msgstr "Cseh:"  msgid "Italian:"  msgstr "Olasz:" +msgid "Hungarian:" +msgstr "" +  msgid "Information"  msgstr "Infó" @@ -563,21 +566,11 @@ msgstr "Új keresés létrehozása"  msgid "Edit Search"  msgstr "Keresés szerkesztése" -msgid "" -"Small search pattern.\\n" -"Do you really want to use it?" -msgstr "" -"Túl rövid minta.\\n" -"Biztos ezt akarod használni?" +msgid "Small search pattern.\\nDo you really want to use it?" +msgstr "Túl rövid minta.\\nBiztos ezt akarod használni?" -msgid "" -"You didn't select at least one of\\n" -"title, subtitle or description.\\n" -"Do you really want to use this search?" -msgstr "" -"Egyetlen címet, alcimet vagy\\n" -"leírást sem választottál ki\\n" -"Biztos ezt akarod használni?" +msgid "You didn't select at least one of\\ntitle, subtitle or description.\\nDo you really want to use this search?" +msgstr "Egyetlen címet, alcimet vagy\\nleírást sem választottál ki\\nBiztos ezt akarod használni?"  msgid "Hide results"  msgstr "Eredmények elrejtése" @@ -1275,6 +1268,9 @@ msgstr "Parancsok:"  msgid "Really run this command?"  msgstr "Biztos, hogy futtassuk ezt a parancsot?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Kijelölt felvételek törlése" @@ -1526,4 +1522,3 @@ msgstr "Időzítől"  msgid "System default"  msgstr "Rendszer alapértelmezett" - @@ -7,7 +7,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM-3.6.6\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2012-05-03 20:19+0100\n"  "Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"  "Language-Team: Italian <vdr-italian@tiscali.it>\n" @@ -556,21 +556,11 @@ msgstr "Aggiungi nuova ricerca"  msgid "Edit Search"  msgstr "Modifica ricerca" -msgid "" -"Small search pattern.\\n" -"Do you really want to use it?" -msgstr "" -"Valore piccola ricerca.\\n" -"Sei sicuro di usarla?" +msgid "Small search pattern.\\nDo you really want to use it?" +msgstr "Valore piccola ricerca.\\nSei sicuro di usarla?" -msgid "" -"You didn't select at least one of\\n" -"title, subtitle or description.\\n" -"Do you really want to use this search?" -msgstr "" -"Non hai selezionato almeno uno tra\\n" -"titolo, sottotitolo o descrizione.\\n" -"Sei sicuro di usare questa ricerca?" +msgid "You didn't select at least one of\\ntitle, subtitle or description.\\nDo you really want to use this search?" +msgstr "Non hai selezionato almeno uno tra\\ntitolo, sottotitolo o descrizione.\\nSei sicuro di usare questa ricerca?"  msgid "Hide results"  msgstr "Nascondi risultati" @@ -1268,6 +1258,9 @@ msgstr "Comandi:"  msgid "Really run this command?"  msgstr "Sicuro di eseguire questo comando?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Elimina registrazioni selezionate" @@ -1519,4 +1512,3 @@ msgstr "Timer"  msgid "System default"  msgstr "Predefinita di sistema" - @@ -10,7 +10,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM-3.6.7\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-18 23:41+0200\n"  "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"  "Language-Team: Dutch <nl@li.org>\n" @@ -1260,6 +1260,9 @@ msgstr "Commando's:"  msgid "Really run this command?"  msgstr "Dit commando echt uitvoeren?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Geselecteerde opnames verwijderen" @@ -7,7 +7,7 @@ msgid ""  msgstr ""  "Project-Id-Version: ru\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+0200\n"  "PO-Revision-Date: 2011-11-18 23:41+0200\n"  "Last-Translator: Ville Skyttä <ville.skytta@iki.fi>\n"  "Language-Team: Russian <LL@li.org>\n" @@ -1294,6 +1294,9 @@ msgstr "Команды:"  msgid "Really run this command?"  msgstr "Действительно выполнить команду?" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "Удалить выбранные записи" diff --git a/po/vdradmin.pot b/po/vdradmin.pot index 54c2be1..74f854b 100644 --- a/po/vdradmin.pot +++ b/po/vdradmin.pot @@ -21,7 +21,7 @@ msgid ""  msgstr ""  "Project-Id-Version: VDRAdmin-AM 3.6.9\n"  "Report-Msgid-Bugs-To: Andreas Mair <amair.sob@googlemail.com>\n" -"POT-Creation-Date: 2011-12-11 09:03+0100\n" +"POT-Creation-Date: 2012-07-09 12:23+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" @@ -1269,6 +1269,9 @@ msgstr ""  msgid "Really run this command?"  msgstr "" +msgid "stream all recordings" +msgstr "" +  msgid "Delete Selected Recordings"  msgstr "" diff --git a/template/default/rec_list.html b/template/default/rec_list.html index ea388c3..75a7b34 100644 --- a/template/default/rec_list.html +++ b/template/default/rec_list.html @@ -141,6 +141,10 @@  							<?% IF rec.streamurl %?>  								<span class="action stream"><a href="<?% rec.streamurl %?>"><img src="bilder/stream.png" alt="stream" title="<?% gettext('Stream') %?>" border="0" /></a></span>  							<?% END %?> +						<?% ELSE %?> +							<?% IF rec.streamurl %?> +								<span class="action stream"><a href="<?% rec.streamurl %?>"><img src="bilder/stream.png" alt="stream" title="<?% gettext('Stream') %?>" border="0" /></a></span> +							<?% END %?>  						<?% END %?>  					</td>  					<td class="col_checkbox"> @@ -166,6 +170,14 @@  						<input type="submit" class="submit" name="rec_runcmd" value="<?% gettext('Run') %?>" onclick="return confirm('<?% gettext('Really run this command?') %?>')" />  					</td>  	<?% END %?> +	<?% IF streamfolderurl %?> +					<td align="right"> +						<a href="<?% streamfolderurl %?>"> +							<?% gettext('stream all recordings') %?> +							<img src="bilder/stream.png" alt="stream" title="<?% gettext('Stream') %?>" border="0" /> +						</a> +					</td> +	<?% END %?>  					<td align="right">  						<input type="submit" class="submit" name="rec_delete" value="<?% gettext('Delete Selected Recordings') %?>" onclick="return mdel(this, '<?% gettext('Delete all selected recordings?') %?>');" />  					</td> diff --git a/vdradmind.pl b/vdradmind.pl index 4194345..2a73a2c 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -614,7 +614,7 @@ my @TRUSTED_USER = (      @GUEST_USER, qw(prog_detail_form prog_detail_aktion at_timer_edit at_timer_new at_timer_save at_timer_test at_timer_delete        epgsearch_upds epgsearch_edit epgsearch_save epgsearch_save_template epgsearch_delete_template epgsearch_delete epgsearch_toggle timer_new_form timer_add timer_delete timer_toggle rec_delete rec_rename rec_edit        config prog_switch rc_show rc_hitk grab_picture at_timer_toggle tv_show tv_switch -      live_stream rec_stream rec_play rec_cut force_update vdr_cmds export_channels_m3u epgsearch_config epgsearch_bl_edit epgsearch_bl_save epgsearch_bl_delete) +      live_stream rec_stream rec_stream_folder rec_play rec_cut force_update vdr_cmds export_channels_m3u epgsearch_config epgsearch_bl_edit epgsearch_bl_save epgsearch_bl_delete)  );  my $MyStreamBase = "./vdradmin."; @@ -5119,6 +5119,69 @@ sub rec_stream {      return (header("200", $CONFIG{REC_MIMETYPE}, $data));  } + +sub rec_stream_folder { + +    # return prog_summary(); + +    my $parent = $q->param("parent"); +    if (!$parent) { +        $parent = 0; +    } else { +        $parent = uri_escape($parent); +    } + +    ParseRecordings($parent); +    my @recordings = @RECORDINGS; + +    # sort by date +    @recordings = sort({ $b->{isfolder} <=> $a->{isfolder} || +                         lc($b->{isfolder} ? $a->{name} : "") cmp lc($a->{isfolder} ? $b->{name} : "") || +                         $a->{sse} <=> $b->{sse} } @recordings); + +    my $folder_data; + +    for my $recording (@recordings) { + +        if (!$recording->{isfolder}  && +             $recording->{parent} eq $parent) { +   +            # inplace playlist +            my ($id) = $recording->{recording_id}; +            my ($i, $title, $newtitle); +            my $data; +            my ($date, $time, $day, $month, $hour, $minute); +         + +            $date = $recording->{date}; +            $time = $recording->{time}; +            $title = $recording->{name}; + +            if (length($title) > 0) { +                $title = CGI::unescape($parent) . "~" . $title; +            } + + +            chomp($title); +            ($day,  $month)  = split(/\./, $date); +            ($hour, $minute) = split(/:/,  $time); + +            # VFAT off +            $data = findVideoFiles($minute, $hour, $day, $month, encode_RecTitle($title, 0)); +            unless ($data) { +                # VFAT on +                $data = findVideoFiles($minute, $hour, $day, $month, encode_RecTitle($title, 1)); +            } +         +            $data = dma_encode_rec_stream_url($data); +             +            $folder_data = $folder_data . $data . "\n"; +        } +    } + +    return (header("200", $CONFIG{TV_MIMETYPE}, $folder_data, sprintf("vdradmin.%s", $CONFIG{TV_EXT}) )); +} +  sub encode_RecTitle {      my ($title, $use_vfat) = @_;      my ($c, $i, $newtitle); @@ -6046,6 +6109,7 @@ sub rec_list {                   help_url      => HelpURL("rec_list"),                   reccmds       => \@reccmds,                   stream_rec_on => $CONFIG{ST_FUNC} && $CONFIG{ST_REC_ON}, +                 streamfolderurl => ($CONFIG{ST_FUNC} && $CONFIG{ST_REC_ON}) ? "$MyURL?aktion=rec_stream_folder&parent=$parent" : undef,                   referer       => "&referer=$referer"      };      return showTemplate("rec_list.html", $vars); @@ -6161,7 +6225,8 @@ sub ParseRecordings {                          date         => 0,                          time         => 0,                          lengthmin    => 0, -                        infurl       => sprintf("%s?aktion=rec_list&parent=%s", $MyURL, $recording_id) +                        infurl       => sprintf("%s?aktion=rec_list&parent=%s", $MyURL, $recording_id), +                        streamurl    => "$MyURL?aktion=rec_stream_folder&parent=$recording_id"                       }                  );              } | 
