From fe3ccba5142e58e569fe6549ae36b344bc6b0f00 Mon Sep 17 00:00:00 2001 From: Daniel Matzke Date: Mon, 9 Jul 2012 12:25:44 +0200 Subject: Added streaming of recordings folders. --- HISTORY | 1 + po/cs.po | 5 ++- po/de.po | 5 ++- po/es.po | 5 ++- po/fi.po | 5 ++- po/fr.po | 5 ++- po/hu.po | 27 +++++++---------- po/it.po | 24 +++++---------- po/nl.po | 5 ++- po/ru.po | 5 ++- po/vdradmin.pot | 5 ++- template/default/rec_list.html | 12 ++++++++ vdradmind.pl | 69 ++++++++++++++++++++++++++++++++++++++++-- 13 files changed, 131 insertions(+), 42 deletions(-) diff --git a/HISTORY b/HISTORY index 1c98e15..6d6c14f 100644 --- a/HISTORY +++ b/HISTORY @@ -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). diff --git a/po/cs.po b/po/cs.po index d96b728..316c827 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 \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ä \n" "Language-Team: Czech \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" diff --git a/po/de.po b/po/de.po index a9c2626..9a21b08 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.9\n" "Report-Msgid-Bugs-To: Andreas Mair \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 \n" "Language-Team: German \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" diff --git a/po/es.po b/po/es.po index ee70134..d7bb0c8 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 \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ä \n" "Language-Team: Spanish \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" diff --git a/po/fi.po b/po/fi.po index 3f7cf2c..6f29ab9 100644 --- a/po/fi.po +++ b/po/fi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM-3.6.2\n" "Report-Msgid-Bugs-To: Andreas Mair \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ä \n" "Language-Team: Finnish \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" diff --git a/po/fr.po b/po/fr.po index 4d33e20..6fb1298 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 \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ä \n" "Language-Team: French \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" diff --git a/po/hu.po b/po/hu.po index d116b2c..aec005c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: VDRAdmin-AM 3.6.8\n" "Report-Msgid-Bugs-To: Andreas Mair \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 \n" "Language-Team: Hungarian \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" - diff --git a/po/it.po b/po/it.po index 764ea0c..7492530 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 \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 \n" "Language-Team: Italian \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" - diff --git a/po/nl.po b/po/nl.po index e3d3b17..76a112f 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 \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ä \n" "Language-Team: Dutch \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" diff --git a/po/ru.po b/po/ru.po index a02a1cf..530e2f2 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 \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ä \n" "Language-Team: Russian \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 \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 \n" "Language-Team: LANGUAGE \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 @@ stream + + + stream + @@ -165,6 +169,14 @@ + + + + + + stream + + 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" } ); } -- cgit v1.2.3