Subject: | Cover URL for episodes |
Here is fast fix for retrieving cover for episodes, which doesn't work before:
sub cover {
my CLASS_NAME $self = shift;
my $forced = shift || 0;
if($forced) {
my $parser = $self->_parser(FORCED);
my $cover;
my $title;
if($self->kind eq 'episode') {
($title = $self->title) =~ s/^\"[^"]+"\s*//;
} else {
$title = quotemeta($self->title);
}
while(my $img_tag = $parser->get_tag('img')) {
$img_tag->[1]{alt} ||= '';
last if $img_tag->[1]{alt} =~ /^poster not submitted/i;
if($self->_decode_special_symbols($img_tag->[1]{alt}) =~ /^($title
Poster|Add a poster for $title)$/i) {
$cover = $img_tag->[1]{src};
last;
}
}
$self->{_cover} = $cover;
}
return $self->{_cover};
}