1 package WWW::EZTV::Episode;
6 # ABSTRACT: Show episode
8 has show => is => 'ro', isa => 'WWW::EZTV::Show', required => 1;
9 has title => is => 'ro', isa => 'Str', required => 1;
10 has url => is => 'ro', isa => 'Mojo::URL', required => 1;
18 has _parsed => is => 'ro', lazy => 1, builder => '_parse';
20 has name => is => 'ro', lazy => 1,
21 default => sub { shift->_parsed->{name} };
23 has season => is => 'ro', lazy => 1,
24 default => sub { shift->_parsed->{season} };
26 has number => is => 'ro', lazy => 1,
27 default => sub { shift->_parsed->{number} };
29 has version => is => 'ro', lazy => 1,
30 default => sub { shift->_parsed->{version} };
32 has quality => is => 'ro', lazy => 1,
33 default => sub { shift->_parsed->{quality} || 'standard' };
35 has size => is => 'ro', lazy => 1,
36 default => sub { shift->_parsed->{size} };
39 my $title = shift->title;
45 S (?<season>\d+) E (?<number>\d+)
46 |(?<season>\d+) x (?<number>\d+)
47 |(?<number>\d+) of (?<total>\d+)
51 ((?<quality>\d+p)\s+)?
64 name => $+{name} || $title,
65 chapter => $+{chapter},
66 number => ($+{number}||0) +0,
67 season => ($+{season}||0) +0,
68 total => ($+{total}||0) +0,
69 version => $+{version} || '',
70 quality => $+{quality} || 'standard',
80 How many episodes has this show.
86 Find first L<WWW::EZTV::Link> object matching the given criteria.
87 This method accept an anon function.