diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2011-02-19 16:52:23 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2011-02-19 16:52:23 +0000 |
| commit | 8ae18f266387c843a0d27b461b2f1265cc7c50da (patch) | |
| tree | 42dee2e38863efa9e54faa6779aaaf39c1bbbbd9 /lib | |
| parent | 93508c35ca6f68eb845ce819a86887b12dc322bb (diff) | |
| download | xxv-8ae18f266387c843a0d27b461b2f1265cc7c50da.tar.gz xxv-8ae18f266387c843a0d27b461b2f1265cc7c50da.tar.bz2 | |
Report epg search to browser via opensearch
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/XXV/MODULES/EPG.pm | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/XXV/MODULES/EPG.pm b/lib/XXV/MODULES/EPG.pm index 065fd5e..e1d99b6 100644 --- a/lib/XXV/MODULES/EPG.pm +++ b/lib/XXV/MODULES/EPG.pm @@ -118,7 +118,13 @@ sub module { short => 'ei', callback => sub{ $self->image(@_) }, binary => 'cache' - } + }, + opensearch => { + hidden => 'yes', + binary => 'cache', + callback => sub{ $self->opensearch(@_) } + }, + }, }; return $args; @@ -1037,7 +1043,9 @@ where $_->[14] = datum($_->[14],'time') if($_->[14]); } @$erg; } - unshift(@$erg, $fields); + unless($console->typ eq 'AJAX') { + unshift(@$erg, $fields); + } $console->table($erg); } @@ -1957,4 +1965,17 @@ sub content { return $description; } +sub opensearch { + my $self = shift || return error('No object defined!'); + my $console = shift || return error('No console defined!'); + my $config = shift || return error('No config defined!'); + + return $console->err(gettext("Sorry, feature is'nt supported")) + if ($console->{TYP} ne 'HTML'); + + my $params = {}; + $console->out( $console->parseTemplateFile("opensearch", {}, $params, $console->{call}) + , "application/opensearchdescription+xml" ); +} + 1; |
