Ticket #6421: tmdb.pl_v4.patch
File tmdb.pl_v4.patch, 1.6 KB (added by , 15 years ago) |
---|
-
mythvideo/mythvideo/scripts/tmdb.pl
131 131 TMDBAPIRequest('Movie.getInfo', {'id' => $tmdbid}); 132 132 133 133 $xml = $xs->XMLin($response, 134 ForceArray => ['category', 'production_countries' ],134 ForceArray => ['category', 'production_countries', 'person'], 135 135 KeyAttr => ['key', 'id']); 136 136 137 137 my $movie = $xml->{moviematches}->{movie}; … … 258 258 my ($rc, $response) = 259 259 TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"}); 260 260 261 my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => [ ],261 my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => ['movie'], 262 262 KeyAttr => []); 263 263 my $xml = $xs->XMLin($response); 264 264 265 265 if ($xml->{"opensearch:totalResults"} > 0) { 266 266 # now get the movie data via Movie.getInfo, Movie.imdbLookup does not 267 267 # provide us all the data 268 my $tmdbid = $xml->{moviematches} ->{movie}->{id};268 my $tmdbid = $xml->{moviematches}{movie}[0]{id}; 269 269 270 270 my ($rc, $response) = 271 271 TMDBAPIRequest('Movie.getInfo', {'id' => $tmdbid}); 272 272 273 $xml = XMLin($response, ForceArray=> [ ], KeyAttr => ['key', 'id']);273 $xml = XMLin($response, ForceArray=> ['backdrop'], KeyAttr => ['key', 'id']); 274 274 275 275 foreach my $backdrop (@{$xml->{moviematches}->{movie}->{backdrop}}) { 276 276 # print "$backdrop->{content}\n";