xmltv/grab/eu_epgdata tv_grab_eu_epgdata,1.33,1.34
Jan Schneider <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/eu_epgdata
In directory vz-cvs-3.sog:/tmp/cvs-serv25833/grab/eu_epgdata
Modified Files:
tv_grab_eu_epgdata
Log Message:
Improved EPG data.
- No entities in data anymore
- Use the longest available description (d21) instead of the shortest (d23)
- Set length
- Set country
- Set subtitles
- Set audio/stereo to "dolby digital" instead of "dolby"
- Map more categories to "tvshow"
- Use all available channel names, and prefer the official name
- Fix rating calculation
Index: tv_grab_eu_epgdata
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/eu_epgdata/tv_grab_eu_epgdata,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** tv_grab_eu_epgdata 8 Jun 2012 13:15:56 -0000 1.33
--- tv_grab_eu_epgdata 8 Jun 2012 13:16:12 -0000 1.34
***************
*** 392,400 ****
# but a few seconds are better than nothing :)
if($configuredchannels{$chanid} && $internalregionid == '0') {
! my $title = decode_entities($sendung->first_child('d19')->text);
! my $subtitle = decode_entities($sendung->first_child('d20')->text);
! my $desc = decode_entities($sendung->first_child('d23')->text);
my $start = $sendung->first_child('d4')->text;
my $stop = $sendung->first_child('d5')->text;
my $category = $sendung->first_child('d10')->text;
my $internalgenreid = $sendung->first_child('d25')->text;
--- 392,401 ----
# but a few seconds are better than nothing :)
if($configuredchannels{$chanid} && $internalregionid == '0') {
! my $title = $sendung->first_child('d19')->text;
! my $subtitle = $sendung->first_child('d20')->text;
! my $desc = $sendung->first_child('d21')->text;
my $start = $sendung->first_child('d4')->text;
my $stop = $sendung->first_child('d5')->text;
+ my $length = $sendung->first_child('d7')->text;
my $category = $sendung->first_child('d10')->text;
my $internalgenreid = $sendung->first_child('d25')->text;
***************
*** 403,417 ****
my $wide_aspect = $sendung->first_child('d29')->text;
my $sequence = $sendung->first_child('d26')->text;
! my $production_year = decode_entities($sendung->first_child('d33')->text);
# people
! my $presenter = decode_entities($sendung->first_child('d34')->text);
! my $studio_guest = decode_entities($sendung->first_child('d35')->text);
! my $director = decode_entities($sendung->first_child('d36')->text);
! my $actor = decode_entities($sendung->first_child('d37')->text);
# black and white?
my $bw_colour = $sendung->first_child('d11')->text;
my $stereo_audio = $sendung->first_child('d27')->text;
my $dolby_audio = $sendung->first_child('d28')->text;
--- 404,420 ----
my $wide_aspect = $sendung->first_child('d29')->text;
my $sequence = $sendung->first_child('d26')->text;
! my $country = $sendung->first_child('d32')->text;
! my $production_year = $sendung->first_child('d33')->text;
# people
! my $presenter = $sendung->first_child('d34')->text;
! my $studio_guest = $sendung->first_child('d35')->text;
! my $director = $sendung->first_child('d36')->text;
! my $actor = $sendung->first_child('d37')->text;
# black and white?
my $bw_colour = $sendung->first_child('d11')->text;
+ my $subtitles = $sendung->first_child('d13')->text;
my $stereo_audio = $sendung->first_child('d27')->text;
my $dolby_audio = $sendung->first_child('d28')->text;
***************
*** 425,431 ****
"title" => [ [ $title ] ]);
! if ( length($subtitle) > 0 ) {
push @{$prog{'sub-title'}}, [$subtitle];
}
# use hardcoded categories for mythtv
--- 428,437 ----
"title" => [ [ $title ] ]);
! if ( length($subtitle) > 0 ) {
push @{$prog{'sub-title'}}, [$subtitle];
}
+ if ( length($length) > 0 ) {
+ $prog{'length'} = $length * 60;
+ }
# use hardcoded categories for mythtv
***************
*** 439,443 ****
push @{$prog{'category'}}, ["sports"];
}
! elsif ($category eq "400") {
push @{$prog{'category'}}, ["tvshow"];
}
--- 445,449 ----
push @{$prog{'category'}}, ["sports"];
}
! elsif ($category eq "400" || $category eq "500" || $category eq "600") {
push @{$prog{'category'}}, ["tvshow"];
}
***************
*** 453,457 ****
# people
if ( length($actor)>0 ) {
! $actor =~ s/\s\(.*\)//g; # chop the rolenames
my @actors = split / - /, $actor; # split people
foreach (@actors) { s/^\s+// ; s/\s+$//} # strip blanks
--- 459,463 ----
# people
if ( length($actor)>0 ) {
! $actor =~ s/\s\([^)]*\)//g; # chop the rolenames
my @actors = split / - /, $actor; # split people
foreach (@actors) { s/^\s+// ; s/\s+$//} # strip blanks
***************
*** 481,485 ****
# 2 is never used
if ( $star_rating gt 0 ) {
! $prog{'star-rating'} = ["$star_rating/5"];
}
--- 487,491 ----
# 2 is never used
if ( $star_rating gt 0 ) {
! $prog{'star-rating'} = [($star_rating - 1) . "/4"];
}
***************
*** 490,497 ****
if ($wide_aspect == 1 ) {
$prog{'video'}->{'aspect'} = '16:9';
}
if ($bw_colour == 1 ) {
! $prog{'video'}->{'colour'} = '0';
}
--- 496,507 ----
if ($wide_aspect == 1 ) {
$prog{'video'}->{'aspect'} = '16:9';
+ } else {
+ $prog{'video'}->{'aspect'} = '4:3';
}
if ($bw_colour == 1 ) {
! $prog{'video'}->{'colour'} = 0;
! } else {
! $prog{'video'}->{'colour'} = 1;
}
***************
*** 510,514 ****
# How does it apply to analog broadcasts?
if ($dolby_audio == 1) {
! $prog{'audio'}->{'stereo'} = 'dolby';
}
elsif ($stereo_audio == 1) {
--- 520,524 ----
# How does it apply to analog broadcasts?
if ($dolby_audio == 1) {
! $prog{'audio'}->{'stereo'} = 'dolby digital';
}
elsif ($stereo_audio == 1) {
***************
*** 516,519 ****
--- 526,540 ----
}
+ if ($subtitles == 1) {
+ $prog{'subtitles'} = [ { type => 'teletext' } ];
+ }
+
+ if ( length($country) > 0 ) {
+ my @countries = split /\|/, $country;
+ foreach (@countries) {
+ push @{$prog{'country'}}, [$_];
+ }
+ }
+
if ( length($production_year) > 0 ) {
$production_year =~ s/(\d*).*/$1/; #take only first year
***************
*** 543,550 ****
# Maybe we should just return if we don't know the channel id
}
! my $name = decode_entities($sendung->first_child('ch0')->text);
foreach my $channel (@{$conf->{channel}}) {
if($channel eq $chanid) {
! my %ch = (id => $chanid, 'display-name' => [ [ $name ] ]);
$writer->write_channel(\%ch);
}
--- 564,573 ----
# Maybe we should just return if we don't know the channel id
}
! my $name1 = decode_entities($sendung->first_child('ch11')->text);
! my $name2 = decode_entities($sendung->first_child('ch0')->text);
! my $name3 = decode_entities($sendung->first_child('ch1')->text);
foreach my $channel (@{$conf->{channel}}) {
if($channel eq $chanid) {
! my %ch = (id => $chanid, 'display-name' => [ [$name1], [$name2], [$name3] ]);
$writer->write_channel(\%ch);
}
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/