xmltv/lib XMLTV.pm.in,1.154,1.155

Robert Eden <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/lib
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17344/lib

Modified Files:
	XMLTV.pm.in 
Log Message:
apply patch from [email protected] to add role to <actor>


Index: XMLTV.pm.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/XMLTV.pm.in,v
retrieving revision 1.154
retrieving revision 1.155
diff -C2 -d -r1.154 -r1.155
*** XMLTV.pm.in	14 Jun 2012 06:59:46 -0000	1.154
--- XMLTV.pm.in	13 Oct 2013 20:53:14 -0000	1.155
***************
*** 1135,1146 ****
  	my $role = get_name($_);
  	unless ($known_role{$role}++) {
! 	    warn "unknown thing in credits: $role";
! 	    next;
  	}
- 	push @{$r{$role}}, get_text($_);
      }
      return \%r;
  };
! $Handlers{credits}->[1] = sub( $$$ ) {
      my ($w, $e, $v) = @_; die if not defined $v;
      my %h = %$v;
--- 1135,1153 ----
  	my $role = get_name($_);
  	unless ($known_role{$role}++) {
! 		warn "unknown thing in credits: $role";
! 		next;
! 	}
! 	my %attrs = %{get_attrs($_)};
! 	my $character = $attrs{role} if exists $attrs{role};
! 	if (defined $character) {
! 		push @{$r{$role}}, [ get_text($_), $character ] ;
! 	} else {
! 		push @{$r{$role}}, get_text($_);
  	}
      }
      return \%r;
  };
! 
! $Handlers{'credits'}->[1] = sub( $$$ ) {
      my ($w, $e, $v) = @_; die if not defined $v;
      my %h = %$v;
***************
*** 1156,1162 ****
  	my @people = @{delete $h{$_}};
  	foreach my $person (@people) {
! 	    die if not defined $person;
! 	    $w->dataElement($_, $person) if $w;
! 	}
      }
      warn_unknown_keys($e, \%h);
--- 1163,1173 ----
  	my @people = @{delete $h{$_}};
  	foreach my $person (@people) {
! 	    	die if not defined $person;
! 		if (ref($person) eq 'ARRAY') {
! 			$w->dataElement($_, @{$person}[0], 'role' => @{$person}[1] ) if $w;
! 		} else {
! 			$w->dataElement($_, $person) if $w;
! 		} 
!         }
      }
      warn_unknown_keys($e, \%h);


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.