33
33
# skylife.it has moved to guidatv.sky.it
36
36
# major optimizations in skylife.it! (thanks Massimo Savazzi)
38
# better handling of season /episodes after site changes
39
# now using also the dtd tags episode-num
37
40
#################################################
39
42
# - add more informative errors in xml
53
use XMLTV::Version '$Id: tv_grab_it.in,v 1.59 2008/01/15 18:13:07 mnbjhguyt Exp $';
56
use XMLTV::Version '$Id: tv_grab_it.in,v 1.60 2008/06/30 15:39:37 mnbjhguyt Exp $';
54
57
use XMLTV::Capabilities qw/baseline manualconfig cache/;
55
58
use XMLTV::Description 'Italy';
56
59
use XMLTV::Supplement qw/GetSupplement/;
1495
1498
my $desc = $content;
1497
my ($cast, $country, $director, $year, $length, $subtitle);
1500
my ($cast, $country, $director, $year, $length, $subtitle, $episode, $season);
1502
if ($desc=~/(.*?)\' Stagione - Ep.(\d+?) - (.*)/) {
1505
$desc = $3 if ($3 ne '');
1499
1508
if ($desc=~/(.*?) - (.*)/) {
1500
$subtitle = $1 if ($1 ne '' and $1 ne $programme->{title});
1509
$subtitle = $1 if ($1 ne '' and $1 ne $programme->{title});
1501
1510
$desc = $2 if ($2 ne '');
1512
if ($subtitle=~/(.*?)\' Stagione/){$season = $1;}
1513
if ($subtitle=~/Ep.(\d+)/) {$episode = $1;}
1514
$subtitle='' if ($season or $episode);
1504
1518
if ($desc=~/^\'(.*?)\' (.*)/) {
1505
$subtitle.= ' - ' if ($subtitle);
1506
$subtitle.= $1 if ($1 ne '' and $1 ne $programme->{title});
1519
$subtitle.= ' - ' if ($subtitle);
1520
$subtitle= $1 if ($1 ne '' and $1 ne $programme->{title});
1507
1521
$desc = $2 if ($2 ne '');
1525
$strseason.= 'Stagione '.$season if ($season);
1526
if ($episode and $season){
1527
$strseason.= ' Episodio '.$episode ;
1530
$strseason.= 'Episodio '.$episode ;
1533
if ($strseason and $subtitle){
1534
$subtitle="$strseason - ".$subtitle ;
1537
$subtitle=$strseason;
1511
1540
if ($desc=~/^Regia di (.*?), con (.*?); (.*?) (\d+?) \((\d+) min\)\. (.*)/) {
1512
1541
$director = $1;
1556
1585
$programme->{length}= $length*60 if ($length);
1557
1586
$programme->{date}= $year if ($year);
1558
1587
$programme->{'sub-title'}=[[$subtitle, $LANG] ] if ($subtitle);
1559
push @{$programme->{credits}->{director}}, $director if ($director);
1588
push@{$programme->{'episode-num'}}, [$strseason, 'onscreen'] if ($strseason);
1589
push@{$programme->{'episode-num'}}, [(defined $season ? ($season-1) : '').".".(defined $episode ? ($episode-1) : '').".0/1", 'xmltv_ns'] if ($strseason);
1591
push @{$programme->{credits}->{director}}, $director if ($director);
1560
1592
push (@{$programme->{country}}, [$country, $LANG]) if ($country);
1561
1593
$programme->{desc}=[[tidy($desc), $LANG ]] if ($desc ne '');