The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Video::Filename - Parse filenames for information about the video

SYNOPSIS

  use Video::Filename;

  my $file = Video::Filename::new($filename, [$series, [$season, [$episode]]]);

  # TV Episode
  $file->{regex}
  $file->{dir}
  $file->{file}
  $file->{series}
  $file->{season}
  $file->{episode}
  $file->{endep}
  $file->{subep}
  $file->{part}
  $file->{epname}
  $file->{ext}

  # Movie
  $file->{movie}
  $file->{year}
  $file->{title}

  $file->isEpisode();
  $file->isMovie();
  $file->testVideoFilename();

DESCRIPTION

Video::Filename is used to parse information line name/season/episode and such from a video filename. It also does a reasonable job at distinguishing a movie from a tv episode.

$file = Video::Filename::new(FILENAME, [SERIES_NAME, [SEASON, [EPISODE]]]);

Parse FILENAME and return a Video::Filename object containing the data. If you specify SERIES_NAME, SEASON, and/or EPISODE it will override what is parsed from FILENAME.

isEpisode();

Returns true if the object represents a TV episode.

isMovie();

Returns true if the object represents a Movie.

testVideoFilename();

Run a series of tests on the rules used to parse filenames. Basically a test harness.

COPYRIGHT

Copyright (c) 2008 by Behan Webster. All rights reserved.

LICENSE

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 2 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, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

AUTHOR

Behan Webster <behanw@websterwood.com>