Sign in to PrePAN

File::TVShow::Info Extract meta data in TV Show File name



use File::TVShow::Info

my $obj = File::TVShow::Info->new("S.W.A.T.2017.S01E15.Crews.WEBRip.DDP5.1.x264-NTb[eztv].mkv");

if($obj->is_tv_show() && $obj->is_by_season()) {
  print "Show Name: " . $obj->show_name() . "\n";
  if ($obj->has_year()) {
    print "Year: " . $obj->year() . "\n";
  print "Season: " . $obj->season() . "\n";
  print "Episode Name: " . $obj->episode_name() . "\n";

my $obj2 = File::TVShow::Info->new("S.W.A.T.2017.S01E15.Crews.WEBRip.DDP5.1.x264-NTb[eztv]");

if ($ob2->is_tv_subtitle()) {
  print "Subtitle Language: " . $obj->subtitle_lang() . "\n";


This is a TV Show only module which is aimed at giving extended support compared to Video::Filename.

I have looked around and not found a module similar. I currently use Video::Filename for File::TVShow::Organize

This module would be able support naming in for the forms of:

ShowName.SXXEXX.EpName.resolution.ext ShowName.YYYY.MM.DD.EpName.resolution.ext

It would also able to extract some of the other details in the file name.

One limit is that EpName MUST be directly after episode number

I have made my GitHub Repo public. Please review the development branch if you are interested.


I would reconsider the module name. Parse::Filename::Series seems more fitting. And if you don't want to reinvent the parsing logic, take a look at the guessit and flexget projects. They're both written in python, but are well-established, maintained, and have many users. So most of the kinks have already been worked out. I'm not sure how easy it would be to convert to perl, though.
I have also been working on making a python version of this. The python is more a learning exercise as I have not written python before. I have looked at guessit and I am looking to work in some of its features. Without actually copying it.

Please sign up to post a review.