NAME

Net::MythTV - Interface to MythTV

SYNOPSIS

use Net::MythTV;

my $mythtv = Net::MythTV->new();
my @recordings = $mythtv->recordings;
foreach my $recording (@recordings) {
  my $filename = $recording->title . ' ' . $recording->start . '.mpg';
  $filename =~ s{[^a-zA-Z0-9]}{_}g;
  print $recording->channel . ', '
    . $recording->title . ' '
    . $recording->start . ' - '
    . $recording->stop . ' ('
    . $recording->size . ') -> '
    . $filename
    . "\n";
  $mythtv->download_recording( $recording, $filename );
}

# prints out something like:
# BBC TWO, Springwatch 2009-06-11T19:00:00 - 2009-06-11T20:00:00
#   (3184986020) -> Springwatch_2009_06_11T19_00_00_mpg
# Channel 4, Derren Brown 2009-06-11T22:40:00 - 2009-06-11T23:10:00
#   (1734615088) -> Derren_Brown_2009_06_11T22_40_00_mpg

DESCRIPTION

This module provides a simple interface to MythTV using the MythTV protocol. 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 and to download them to a local file. By default the MythTV protocol is only allowed on the local machine running MythTV.

METHODS

new

The constructor takes a hostname and port, but defaults to:

my $mythtv = Net::MythTV->new();
my $mythtv = Net::MythTV->new( hostname => 'localhost', port => 6543 );

recordings

List the recordings and return them as Net::MythTV::Recording objects:

my @recordings = $mythtv->recordings;
foreach my $recording (@recordings) {
  print $recording->channel . ', '
    . $recording->title . ' '
    . $recording->start . ' - '
    . $recording->stop . ' ('
    . $recording->size . ') -> '
    . $filename
    . "\n";
}

download_recording

Downloads a recording to a local file:

$mythtv->download_recording( $recording, $filename );

SEE ALSO

Net::MythTV::Connection, Net::MythTV::Recording.

AUTHOR

Leon Brocard <acme@astray.com>.

COPYRIGHT

Copyright (C) 2009, Leon Brocard

LICENSE

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.