Net::MythWeb - Interface to MythTV via MythWeb
use Net::MythWeb; my $mythweb = Net::MythWeb->new( hostname => 'owl.local', port => 80 ); foreach my $channel ( $mythweb->channels ) { print $channel->name . "\n"; } foreach my $recording ( $mythweb->recordings ) { print $recording->channel->id, ', ', $recording->channel->number, ', ', $recording->channel->name, "\n"; print $recording->start, ' -> ', $recording->stop, ': ', $recording->title, ', ', $recording->subtitle, ', ', $recording->description; $recording->download("recording.mpg"); $recording->delete; } my $programme = $mythweb->programme( $channel, $start_as_datetime ); $programme->record;
This module provides a simple interface to MythTV by making HTTP requests to its MythWeb web server front end. MythTV is a free open source digital video recorder. Find out more at http://www.mythtv.org/.
This module allows you to query the recordings, download them to a local file and schedule new recordings.
The constructor takes a hostname and port:
my $mythweb = Net::MythWeb->new( hostname => 'owl.local', port => 80 );
List the channels and return them as Net::MythWeb::Channel objects:
foreach my $channel ( $mythweb->channels ) { print $channel->name . "\n"; }
List the recordings and return them as Net::MythWeb::Programme objects:
foreach my $recording ( $mythweb->recordings ) { print $recording->channel->id, ', ', $recording->channel->number, ', ', $recording->channel->name, "\n"; print $recording->start, ' -> ', $recording->stop, ': ', $recording->title, ', ', $recording->subtitle, ', ', $recording->description; $recording->download("recording.mpg"); $recording->delete; }
Returns a Net::MythWeb::Programme for the programme which starts at a given time on the channel:
my $programme = $mythweb->programme( $channel, $start_as_datetime ); $programme->record;
Net::MythWeb::Channel, Net::MythWeb::Programme.
Leon Brocard <acme@astray.com>.
Copyright (C) 2009, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
To install Net::MythWeb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::MythWeb
CPAN shell
perl -MCPAN -e shell install Net::MythWeb
For more information on module installation, please visit the detailed CPAN module installation guide.