Index: mythplugins/mythvideo/mythvideo/scripts/tmdb.pl
===================================================================
--- mythplugins/mythvideo/mythvideo/scripts/tmdb.pl	(revision 20411)
+++ mythplugins/mythvideo/mythvideo/scripts/tmdb.pl	(working copy)
@@ -117,23 +117,15 @@
 
     # get the search results page via Movie.imdbLookup
     my ($rc, $response) =
-        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
+        TMDBAPIRequest('Movie.getInfo', {'id' => "$movieid"});
 
     my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => ['movie'],
         KeyAttr => []);
-    my $xml = $xs->XMLin($response);
+    my $xml = $xs->XMLin($response,
+        ForceArray => ['category', 'production_countries', 'person'],
+        KeyAttr => ['key', 'id']);
 
     if ($xml->{"opensearch:totalResults"} > 0) {
-        # now get the movie data via Movie.getInfo, Movie.imdbLookup does not
-        # provide us all the data
-        my $tmdbid = $xml->{moviematches}->{movie}->[0]->{id};
-        my ($rc, $response) =
-            TMDBAPIRequest('Movie.getInfo', {'id' => $tmdbid});
-
-        $xml = $xs->XMLin($response,
-            ForceArray => ['category', 'production_countries'],
-            KeyAttr => ['key', 'id']);
-
         my $movie = $xml->{moviematches}->{movie};
         my $title       = $movie->{title};
         my $releasedate = $movie->{release};
@@ -233,7 +225,7 @@
 
     # get the search results  page
     my ($rc, $response) =
-        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
+        TMDBAPIRequest('Movie.getInfo', {'id' => "$movieid"});
 
     my $xml = XMLin($response, ForceArray => ['movie', 'poster', 'backdrop'],
         KeyAttr => {poster => 'size'});
@@ -256,22 +248,13 @@
 
     # get the search results page via Movie.imdbLookup
     my ($rc, $response) =
-        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
+        TMDBAPIRequest('Movie.getInfo', {'id' => "$movieid"});
 
-    my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => [],
+    my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => ['movie'],
         KeyAttr => []);
-    my $xml = $xs->XMLin($response);
+    my $xml = $xs->XMLin($response, ForceArray=> ['backdrop'], KeyAttr => ['key', 'id']);
 
     if ($xml->{"opensearch:totalResults"} > 0) {
-        # now get the movie data via Movie.getInfo, Movie.imdbLookup does not
-        # provide us all the data
-        my $tmdbid = $xml->{moviematches}->{movie}->{id};
-
-        my ($rc, $response) =
-            TMDBAPIRequest('Movie.getInfo', {'id' => $tmdbid});
-
-        $xml = XMLin($response, ForceArray=> [], KeyAttr => ['key', 'id']);
-
         foreach my $backdrop (@{$xml->{moviematches}->{movie}->{backdrop}}) {
             # print "$backdrop->{content}\n";
 
@@ -311,7 +294,7 @@
                 next;
             }
 
-            my $movienum  = $movie->{imdb};
+            my $movienum  = $movie->{id};
             my $moviename = $movie->{title};
             my $release   = $movie->{release};
             my $movieyear = 0;
@@ -321,7 +304,6 @@
             }
 
             if ($movienum) {
-                $movienum =~ s/^tt//;
                 my $entry = $movienum . ":" . $moviename;
                 if ($release) {
                     $entry = $entry . " (". $movieyear . ")";

