Index: mythplugins/mythvideo/mythvideo/scripts/tmdb.pl
===================================================================
--- mythplugins/mythvideo/mythvideo/scripts/tmdb.pl	(revision 21220)
+++ mythplugins/mythvideo/mythvideo/scripts/tmdb.pl	(working copy)
@@ -117,7 +117,7 @@
 
     # get the search results page via Movie.imdbLookup
     my ($rc, $response) =
-        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
+        TMDBAPIRequest('Movie.getInfo' {'id' => "$movieid"});
 
     if (!defined $response) {
         die "Unable to contact themoviedb.org while retrieving ".
@@ -126,24 +126,11 @@
 
     my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => ['movie'],
         KeyAttr => []);
-    my $xml = $xs->XMLin($response);
-
-    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});
-
-        if (!defined $response) {
-            die "Unable to contact themoviedb.org while retrieving ".
-                "movie data, stopped";
-        }
-
-        $xml = $xs->XMLin($response,
+    my $xml = $xs->XMLin($response,
             ForceArray => ['category', 'production_countries', 'person'],
             KeyAttr => ['key', 'id']);
 
+    if ($xml->{"opensearch:totalResults"} > 0) {
         my $movie = $xml->{moviematches}->{movie};
         my $title       = $movie->{title};
         my $releasedate = $movie->{release};
@@ -244,7 +231,7 @@
 
     # get the search results  page
     my ($rc, $response) =
-        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
+        TMDBAPIRequest('Movie.getInfo', {'id' => "$movieid"});
 
     if (!defined $response) {
         die "Unable to contact themoviedb.org while retrieving ".
@@ -272,7 +259,7 @@
 
     # get the search results page via Movie.imdbLookup
     my ($rc, $response) =
-        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
+        TMDBAPIRequest('Movie.getInfo', {'id' => "$movieid"});
 
     if (!defined $response) {
         die "Unable to contact themoviedb.org while retrieving ".
@@ -281,23 +268,9 @@
 
     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}[0]{id};
-
-        my ($rc, $response) =
-            TMDBAPIRequest('Movie.getInfo', {'id' => $tmdbid});
-
-        if (!defined $response) {
-            die "Unable to contact themoviedb.org while retrieving ".
-                "movie backdrop, stopped";
-        }
-
-        $xml = XMLin($response, ForceArray=> ['backdrop'], KeyAttr => ['key', 'id']);
-
         foreach my $backdrop (@{$xml->{moviematches}->{movie}->{backdrop}}) {
             # print "$backdrop->{content}\n";
 
@@ -342,7 +315,7 @@
                 next;
             }
 
-            my $movienum  = $movie->{imdb};
+            my $movienum  = $movie->{id};
             my $moviename = $movie->{title};
             my $release   = $movie->{release};
             my $movieyear = 0;
@@ -352,7 +325,6 @@
             }
 
             if ($movienum) {
-                $movienum =~ s/^tt//;
                 my $entry = $movienum . ":" . $moviename;
                 if ($release) {
                     $entry = $entry . " (". $movieyear . ")";

