1 package WWW::EZTV::Episode;
5 # ABSTRACT: Show episode
7 has show => is => 'ro', isa => 'WWW::EZTV::Show', required => 1;
8 has title => is => 'ro', isa => 'Str', required => 1;
9 has url => is => 'ro', isa => 'Mojo::URL', required => 1;
17 has _parsed => is => 'ro', lazy => 1, builder => '_parse';
19 has name => is => 'ro', lazy => 1,
20 default => sub { shift->_parsed->{name} };
22 has season => is => 'ro', lazy => 1,
23 default => sub { shift->_parsed->{season} };
25 has number => is => 'ro', lazy => 1,
26 default => sub { shift->_parsed->{number} };
28 has version => is => 'ro', lazy => 1,
29 default => sub { shift->_parsed->{version} };
31 has quality => is => 'ro', lazy => 1,
32 default => sub { shift->_parsed->{quality} || 'standard' };
34 has size => is => 'ro', lazy => 1,
35 default => sub { shift->_parsed->{size} };
38 my $title = shift->title;
44 S (?<season>\d+) E (?<number>\d+)
45 |(?<season>\d+) x (?<number>\d+)
46 |(?<number>\d+) of (?<total>\d+)
50 ((?<quality>\d+p)\s+)?
63 name => $+{name} || $title,
64 chapter => $+{chapter},
65 number => ($+{number}||0) +0,
66 season => ($+{season}||0) +0,
67 total => ($+{total}||0) +0,
68 version => $+{version} || '',
69 quality => $+{quality} || 'standard',
79 How many episodes has this show.
85 Find first L<WWW::EZTV::Link> object matching the given criteria.
86 This method accept an anon function.