From e1f97fae0ca169df8c293d5d090b58da072fabc5 Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Mon, 24 Oct 2005 12:29:26 +0200 Subject: 2005-10-24: 0.97-am3.4.2rc2 - For VDR >=1.3.24 use VDR's timer flags for finding timers that are currently recording. - Fixed sendmail notification for AutoTimer. - If /usr/bin/locale is not available, language can be entered in textfield instead of chosing in selectbox. - Fixed wrong display of double quotes in timer_list and at_timer_list. --- HISTORY | 6 +++ locale/de/LC_MESSAGES/vdradmin.mo | Bin 54713 -> 54679 bytes locale/es/LC_MESSAGES/vdradmin.mo | Bin 46075 -> 46075 bytes locale/fi/LC_MESSAGES/vdradmin.mo | Bin 11406 -> 12045 bytes locale/fr/LC_MESSAGES/vdradmin.mo | Bin 40194 -> 40194 bytes po/fi.po | 44 +++++++++---------- template/default/config.html | 8 +++- template/default/copper/style.css | 3 +- template/default/default/style.css | 7 ++- template/default/style.css | 3 +- vdradmind.pl | 85 +++++++++++++++++++------------------ 11 files changed, 83 insertions(+), 73 deletions(-) diff --git a/HISTORY b/HISTORY index 819da54..2761f9a 100644 --- a/HISTORY +++ b/HISTORY @@ -4,6 +4,12 @@ E-Mail: mail AT andreas DOT vdr-developer DOT org VDR-Portal: amair ----------------------------------------------------------- +2005-10-24: 0.97-am3.4.2rc2 +- For VDR >=1.3.24 use VDR's timer flags for finding timers that are currently recording. +- Fixed sendmail notification for AutoTimer. +- If /usr/bin/locale is not available, language can be entered in textfield instead of chosing in selectbox. +- Fixed wrong display of double quotes in timer_list and at_timer_list. + 2005-10-21: 0.97-am3.4.2rc - Hopefully fixed browsing in "recordings" menu (if there are folders having the same name). - Added new skin "default". diff --git a/locale/de/LC_MESSAGES/vdradmin.mo b/locale/de/LC_MESSAGES/vdradmin.mo index 89a74f3..9cfc231 100644 Binary files a/locale/de/LC_MESSAGES/vdradmin.mo and b/locale/de/LC_MESSAGES/vdradmin.mo differ diff --git a/locale/es/LC_MESSAGES/vdradmin.mo b/locale/es/LC_MESSAGES/vdradmin.mo index f492b71..20375c1 100644 Binary files a/locale/es/LC_MESSAGES/vdradmin.mo and b/locale/es/LC_MESSAGES/vdradmin.mo differ diff --git a/locale/fi/LC_MESSAGES/vdradmin.mo b/locale/fi/LC_MESSAGES/vdradmin.mo index b526911..a26568b 100644 Binary files a/locale/fi/LC_MESSAGES/vdradmin.mo and b/locale/fi/LC_MESSAGES/vdradmin.mo differ diff --git a/locale/fr/LC_MESSAGES/vdradmin.mo b/locale/fr/LC_MESSAGES/vdradmin.mo index 3c31d29..e00e4f8 100644 Binary files a/locale/fr/LC_MESSAGES/vdradmin.mo and b/locale/fr/LC_MESSAGES/vdradmin.mo differ diff --git a/po/fi.po b/po/fi.po index 4352230..64456b3 100644 --- a/po/fi.po +++ b/po/fi.po @@ -100,7 +100,7 @@ msgstr "Ei" #: ../template/default/timer_new.html:82 #: ../template/default/help_timer_new.html:36 msgid "AutoTimer Checking:" -msgstr "Automaattisen ajastimen tarkistus:" +msgstr "Hakuajastimen tarkistus:" #: ../template/default/timer_new.html:85 #: ../template/default/help_timer_new.html:39 @@ -268,11 +268,11 @@ msgstr "" #: ../template/default/help_at_timer_list.html:22 #: ../template/default/navigation.html:50 msgid "AutoTimer" -msgstr "Automaattiset ajastimet" +msgstr "Hakuajastimet" #: ../template/default/at_timer_list.html:39 msgid "New AutoTimer" -msgstr "Uusi automaattinen ajastin" +msgstr "Uusi hakuajastin" #: ../template/default/at_timer_list.html:58 #: ../template/default/timer_list.html:220 @@ -328,7 +328,7 @@ msgstr "P #: ../template/default/at_timer_list.html:196 msgid "Delete Selected AutoTimers" -msgstr "Poista valitut automaattiset ajastimet" +msgstr "Poista valitut hakuajastimet" #: ../template/default/at_timer_list.html:196 #: ../template/default/timer_list.html:378 @@ -412,7 +412,7 @@ msgstr "K #: ../template/default/config.html:96 ../template/default/help_config.html:50 msgid "Language:" -msgstr "" +msgstr "Kieli:" #: ../template/default/config.html:116 ../template/default/help_config.html:38 #: ../template/default/help_config.html:56 @@ -433,7 +433,7 @@ msgstr "Konfigurointitiedostojen polku:" #: ../template/default/config.html:144 ../template/default/help_config.html:64 msgid "Path to EPG images:" -msgstr "Ohjelmisto-oppaan kuvien polku:" +msgstr "Ohjelmisto-oppaan kuvapolku:" #: ../template/default/config.html:158 ../template/default/help_config.html:38 #: ../template/default/help_config.html:70 @@ -478,7 +478,7 @@ msgstr "Ajankohdat:" #: ../template/default/help_config.html:92 #: ../template/default/help_config.html:108 msgid "Tooltips:" -msgstr "" +msgstr "Lisätietolaatikot:" #: ../template/default/config.html:260 #: ../template/default/help_config.html:100 @@ -518,12 +518,12 @@ msgstr "Ajastimet" #: ../template/default/config.html:352 #: ../template/default/help_config.html:124 msgid "Tooltips in timeline:" -msgstr "" +msgstr "Lisätietolaatikot \"Aikajana\"-sivulla:" #: ../template/default/config.html:361 #: ../template/default/help_config.html:126 msgid "Tooltips in list:" -msgstr "" +msgstr "Lisätietolaatikot \"Ajastimet\"-sivulla:" #: ../template/default/config.html:379 ../template/default/help_config.html:38 #: ../template/default/help_config.html:132 @@ -597,12 +597,11 @@ msgstr "K #: ../template/default/config.html:534 msgid "In \"AutoTimer\"?" -msgstr "Käytä kanavavalintoja \"Automaattiset ajastimet\"-sivulla" +msgstr "Käytä kanavavalintoja \"Hakuajastimet\"-sivulla" #: ../template/default/config.html:543 -#, fuzzy msgid "In \"Watch TV\"?" -msgstr "Katso TV:tä" +msgstr "Käytä kanavavalintoja \"Katso TV:tä\"-sivulla" #: ../template/default/config.html:584 msgid "Apply" @@ -620,11 +619,11 @@ msgstr "min" #: ../template/default/timer_list.html:27 msgid "Transponder:" -msgstr "" +msgstr "Transponderi:" #: ../template/default/timer_list.html:27 msgid "CA-System:" -msgstr "" +msgstr "Salaus:" #: ../template/default/timer_list.html:46 msgid "New Timer" @@ -1061,7 +1060,6 @@ msgid "New Name of Recording:" msgstr "Tallenteen uusi nimi:" #: ../template/default/rec_edit.html:51 -#, fuzzy msgid "Subtitle:" msgstr "Lyhyt kuvaus" @@ -1213,7 +1211,7 @@ msgstr "" #: ../template/default/at_timer_new.html:6 #: ../template/default/at_timer_new.html:20 msgid "Edit AutoTimer" -msgstr "Muokkaa automaattista ajastinta" +msgstr "Muokkaa hakuajastinta" #: ../template/default/help_at_timer_new.html:35 msgid "" @@ -1406,7 +1404,7 @@ msgstr "" #: ../template/default/at_timer_new.html:6 #: ../template/default/at_timer_new.html:20 msgid "Add New AutoTimer" -msgstr "Lisää uusi automaattinen ajastin" +msgstr "Lisää uusi hakuajastin" #: ../template/default/at_timer_new.html:50 #: ../template/default/at_timer_new.html:54 @@ -1433,21 +1431,19 @@ msgstr "Kaikki" #: ../template/default/at_timer_new.html:177 msgid "Test" -msgstr "" +msgstr "Hae" #: ../template/default/at_timer_new.html:192 msgid "Broadcasted" -msgstr "" +msgstr "Lähetysaika" #: ../template/default/at_timer_new.html:193 -#, fuzzy msgid "Stored in" -msgstr "Suoratoisto" +msgstr "Tallennehakemisto" #: ../template/default/at_timer_new.html:213 -#, fuzzy msgid "No matches found!" -msgstr "Ei löydy" +msgstr "Ei löytynyt yhtään hakutulosta!" #: ../template/default/navigation.html:66 msgid "Watch TV" @@ -1509,7 +1505,7 @@ msgstr "Ohjelmisto %d. p #: ../vdradmind.pl:4284 msgid "System default" -msgstr "" +msgstr "Oletus" #: ../template/i18n.pl:3 msgid "Playing Today?" diff --git a/template/default/config.html b/template/default/config.html index 45913c6..7bfd04d 100644 --- a/template/default/config.html +++ b/template/default/config.html @@ -95,11 +95,15 @@
<%! Language: !%>
+ + + + diff --git a/template/default/copper/style.css b/template/default/copper/style.css index bbb40c4..6bbb183 100644 --- a/template/default/copper/style.css +++ b/template/default/copper/style.css @@ -58,7 +58,8 @@ label + input { margin-left: 1em; } .col_duration { padding-left: 3px; padding-right: 3px; width: 120px; vertical-align: top; } .col_name, .col_title * { padding-left: 3px; padding-right: 3px; min-width: 50px; white-space: normal; } .col_info, .col_record { width: 65px; text-align: center; } -.col_active, .col_stream { width: 70px; max-width: 70px; } +.col_active { width: 75px; max-width: 75px; } +.col_stream { width: 70px; max-width: 70px; } .col_channel { width: 120px; } .col_start, .col_stop, .col_date, .col_time { width: 66px; text-align: right; } .col_edit, .col_delete, .col_checkbox { text-align: center; width: 30px; max-width: 30px; } diff --git a/template/default/default/style.css b/template/default/default/style.css index 35c50c8..71e9e81 100644 --- a/template/default/default/style.css +++ b/template/default/default/style.css @@ -130,9 +130,9 @@ label + input { .footer td.selected, .col_left, .col_right, -#timer_new .heading, -#at_timer_new .heading, -#rec_edit .heading { +#timer_new .group .heading, +#at_timer_new .group .heading, +#rec_edit .group .heading { display: none; } body.help .heading { @@ -316,7 +316,6 @@ body.help .heading { } .col_active { width: 70px; - max-width: 70px; } .col_channel { width: 120px; diff --git a/template/default/style.css b/template/default/style.css index 3ee4787..3f6be1b 100644 --- a/template/default/style.css +++ b/template/default/style.css @@ -59,7 +59,8 @@ label + input { margin-left: 1em; } .col_duration { padding-left: 3px; padding-right: 3px; width: 120px; vertical-align: top; } .col_name, .col_title * { padding-left: 3px; padding-right: 3px; min-width: 50px; white-space: normal; } .col_info, .col_record { width: 65px; text-align: center; } -.col_active, .col_stream { width: 70px; max-width: 70px; } +.col_active { width: 75px; max-width: 75px; } +.col_stream { width: 70px; max-width: 70px; } .col_channel { width: 120px; } .col_start, .col_stop, .col_date, .col_time { width: 66px; text-align: right; } .col_edit, .col_delete, .col_checkbox { text-align: center; width: 30px; max-width: 30px; } diff --git a/vdradmind.pl b/vdradmind.pl index ea196f1..b569b67 100755 --- a/vdradmind.pl +++ b/vdradmind.pl @@ -66,7 +66,7 @@ use strict; #use warnings; my $SEARCH_FILES_IN_SYSTEM = 0; -my $VDR_MAX_SVDRP_LENGTH = 10218; # validate this value +my $VDR_MAX_SVDRP_LENGTH = 10000; # validate this value my $SUPPORTED_LOCALE_PREFIXES = "^(de|en|es|fi|fr)_"; sub true () { 1 }; @@ -159,7 +159,7 @@ $CONFIG{CHANNELS_WANTED_WATCHTV} = ""; # $CONFIG{PROG_SUMMARY_COLS} = 3; -my $VERSION = "0.97-am3.4.2rc"; +my $VERSION = "0.97-am3.4.2rc2"; my $SERVERVERSION = "vdradmind/$VERSION"; my $LINVDR = isLinVDR(); my $VDRVERSION = 0; @@ -1367,30 +1367,6 @@ sub AutoTimer { } else { Log(LOG_AT, sprintf("AutoTimer: Programming Timer \"%s\" (Event-ID %s, %s - %s)", $title, $event->{event_id}, strftime("%Y%m%d-%H%M", localtime($event->{start})), strftime("%Y%m%d-%H%M", localtime($event->{stop})))); - # AUTOTIMER-Notification patch start - if ($CONFIG{AT_SENDMAIL} == 1) { - my $mail = ""; - my $sum = ""; - my $strt = ""; - my $end = ""; - my $dat = ""; - $sum = $event->{summary}; - # remove all HTML-Tags from text - $sum =~ s/\<[^\>]+\>/ /g; - $dat = strftime("%x", localtime($event->{start})); - $strt= strftime("%H:%M", localtime($event->{start})); - $end = strftime("%H:%M", localtime($event->{stop})); - $mail = sprintf("Created AUTOTIMER for $event->{title}\n===========================================================================\n$dat,$strt-$end\n\nSummary:\n--------\n$sum"); - - # - # the "sendEmail" tool (written by "caspian at dotconf.net") is available from [URL]http://caspian.dotconf.net/menu/Software/SendEmail/[/URL] - # - open (MAIL, "|$CONFIG{MAIL_PROG} -q -f autotimer\@$CONFIG{MAIL_FROMDOMAIN} -t $CONFIG{MAIL_TO} -u \"AUTOTIMER: New timer created for $event->{title}\" -s $CONFIG{MAIL_SERVER}"); - print MAIL $mail; - close(MAIL); - } - # AUTOTIMER-Notification patch end - AT_ProgTimer(0x8001, $event->{event_id}, $event->{vdr_id}, $event->{start}, $event->{stop}, $title, $event->{summary}, $at->{prio}, $at->{lft}); if ($at->{active} == 2) { @@ -1446,6 +1422,28 @@ sub AT_ProgTimer { # we will only programm new timers, CheckTimers is responsible for # updating existing timers if (!$found) { + if ($CONFIG{AT_SENDMAIL} == 1) { + my $mail = ""; + my $sum = ""; + my $strt = ""; + my $end = ""; + my $dat = ""; + $sum = $summary; + # remove all HTML-Tags from text + $sum =~ s/\<[^\>]+\>/ /g; + $dat = strftime("%x", localtime($start)); + $strt= strftime("%H:%M", localtime($start)); + $end = strftime("%H:%M", localtime($stop)); + $mail = sprintf("Created AUTOTIMER for $title\n===========================================================================\n$dat,$strt-$end\n\nSummary:\n--------\n$sum"); + + # + # the "sendEmail" tool (written by "caspian at dotconf.net") is available from [URL]http://caspian.dotconf.net/menu/Software/SendEmail/[/URL] + # + open (MAIL, "|$CONFIG{MAIL_PROG} -q -f autotimer\@$CONFIG{MAIL_FROMDOMAIN} -t $CONFIG{MAIL_TO} -u \"AUTOTIMER: New timer created for $title\" -s $CONFIG{MAIL_SERVER}"); + print MAIL $mail; + close(MAIL); + } + Log(LOG_AT, sprintf("AT_ProgTimer: Programming Timer \"%s\" (Event-ID %s, %s - %s)", $title, $event_id, strftime("%Y%m%d-%H%M", localtime($start)), strftime("%Y%m%d-%H%M", localtime($stop)))); ProgTimer( 0, @@ -1648,8 +1646,10 @@ sub ParseTimer { $active = UnpackActive($tmstatus); $event_id = UnpackEvent_id($tmstatus); - # direct recording (menu, red) - $active = 1 if($active == 3 || $active == 9); + # VDR > 1.3.24 sets a bit if it's currently recording + my $recording = 0; + $recording = 1 if(($active & 8) == 8); + $active = 1 if(($active & 1) == 1); # replace "|" by ":" in timer's title (man vdr.5) $title =~ s/\|/\:/g; @@ -1713,6 +1713,7 @@ sub ParseTimer { startsse => $startsse + $off * 86400, stopsse => $stopsse + $off * 86400, active => $active, + recording => $recording, event_id => $event_id, cdesc => get_name_from_vdrid($vdr_id), transponder => get_transponder_from_vdrid($vdr_id), @@ -1738,6 +1739,7 @@ sub ParseTimer { startsse => $startsse, stopsse => $stopsse, active => $active, + recording => $recording, event_id => $event_id, cdesc => get_name_from_vdrid($vdr_id), transponder => get_transponder_from_vdrid($vdr_id), @@ -2513,7 +2515,8 @@ sub timer_list { my ($TagAnfang, $TagEnde); for my $timer (ParseTimer(0)) { - if($timer->{startsse} < time() && $timer->{stopsse} > time() && ($timer->{active} & 1)) { + # VDR >= 1.3.24 reports if it's recording, so don't overwrite it here + if($VDRVERSION < 10324 && $timer->{recording} == 0 && $timer->{startsse} < time() && $timer->{stopsse} > time() && ($timer->{active} & 1)) { $timer->{recording} = 1; } if($timer->{active} & 1) { @@ -2528,7 +2531,6 @@ sub timer_list { $timer->{toggleurl} = sprintf("%s?aktion=timer_toggle&active=%s&id=%s", $MyURL, ($timer->{active} & 1) ? 0 : 1, $timer->{id}), $timer->{dor} = my_strftime("%a %d.%m", $timer->{startsse}); #TODO - $timer->{title} =~ s/"/\"/g; $timer->{title} = CGI::escapeHTML($timer->{title}); $TagAnfang=my_mktime(0,0,my_strftime("%d", $timer->{start}),my_strftime("%m", $timer->{start}),my_strftime("%Y", $timer->{start})); $TagEnde=my_mktime(0,0,my_strftime("%d", $timer->{stop}),my_strftime("%m", $timer->{stop}),my_strftime("%Y", $timer->{stop})); @@ -3106,7 +3108,6 @@ sub at_timer_list { if($_->{stop}) { $_->{stop} = substr($_->{stop}, 0, 2) . ":" . substr($_->{stop}, 2, 5); } - $_->{pattern} =~ s/"/\"/g; $_->{pattern} = CGI::escapeHTML($_->{pattern}); $_->{modurl} = $MyURL . "?aktion=at_timer_edit&id=$id"; $_->{delurl} = $MyURL . "?aktion=at_timer_delete&id=$id"; @@ -4042,7 +4043,7 @@ sub getRecInfo { if($text) { $text .= "
"; } - $text .= "$_ "; + $text .= CGI::escapeHTML("$_ "); } } } @@ -4052,7 +4053,7 @@ sub getRecInfo { $title =~ s/\~/ - /g; $vars = { usercss => $UserCSS, - text => $text ? CGI::escapeHTML($text) : "", + text => $text ? $text : "", imdburl => "http://akas.imdb.com/Tsearch?title=" . $imdb_title, title => CGI::escapeHTML($title), id => $id @@ -4290,14 +4291,16 @@ sub config { } my @my_locales; - push(@my_locales, {id => "", name => gettext("System default"), cur => 0}); - foreach my $loc (locale("-a")) { - chomp $loc; - push(@my_locales, { - id => $loc, - name => $loc, - cur => ($loc eq $CONFIG{LANG} ? 1 : 0) - }) if ($loc =~ $SUPPORTED_LOCALE_PREFIXES); + if( -e "/usr/bin/locale" ) { + push(@my_locales, {id => "", name => gettext("System default"), cur => 0}); + foreach my $loc (locale("-a")) { + chomp $loc; + push(@my_locales, { + id => $loc, + name => $loc, + cur => ($loc eq $CONFIG{LANG} ? 1 : 0) + }) if ($loc =~ $SUPPORTED_LOCALE_PREFIXES); + } } my $template = TemplateNew("config.html"); -- cgit v1.2.3