### This template is just a quick example of how to write you own plug-in for get_iplayer ### Once written it can be tested by copying to /plugins/ (e.g. ~/.get_iplayer/plugins/) ### The file must be named as .plugin so that get_iplayer will recognise it (use 'get_iplayer --listplugins' to test it) ### must start with a letter and be lowercase ### All the plugin help text in this file starts with '###' ### This template is just a bunch of example methods stolen from different plugins - it wont work as-is # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ################### Podcast class ################# ### Substitute PROGTYPE in the rest of this file to be the type of your plugin (e.g. podcast or hulu etc) package Programme::PROGTYPE; use Env qw[@PATH]; use Fcntl; use File::Copy; use File::Path; use File::stat; use HTML::Entities; use HTTP::Cookies; use HTTP::Headers; use IO::Seekable; use IO::Socket; use LWP::ConnCache; use LWP::UserAgent; use POSIX qw(mkfifo); use strict; use Time::Local; use URI; # Inherit from Programme class use base 'Programme'; # Class vars # Global options my $opt; # Constructor # Usage: $prog{$pid} = Programme->new( 'pid' => $pid, 'name' => $name, ); sub new { my $type = shift; my %params = @_; my $self = {}; for (keys %params) { $self->{$_} = $params{$_}; } ## Ensure that all instances reference the same class global $optref var # $self->{optref} = $Programme::optref; # Ensure the subclass $opt var is pointing to the Superclass global optref $opt = $Programme::optref; bless $self, $type; } ### Choose a min-max range of programme index numbers currently not used by other plugins ### Required sub index_min { return 60001 } sub index_max { return 69999 } ### Keep all you channel listings here if any... (see other plugins for examples) sub channels { return {}; } ### Add any plugin specific options that you want get_iplayer to display in the help pages in the following format: ###