Author: pebender
Date: Sun May 24 09:22:08 2009
New Revision: 4823

Modified:
    trunk/gar-minimyth/script/myth-0.21/mythplugins/checksums
     
trunk/gar-minimyth/script/myth-0.21/mythplugins/files/mythplugins-0.21-mythvideo_tmdb_pl.patch

Log:
- Updated MythVideo 0.21's tmdb.pl patch.



Modified: trunk/gar-minimyth/script/myth-0.21/mythplugins/checksums
==============================================================================
--- trunk/gar-minimyth/script/myth-0.21/mythplugins/checksums   (original)
+++ trunk/gar-minimyth/script/myth-0.21/mythplugins/checksums   Sun May 24  
09:22:08 2009
@@ -1,6 +1,6 @@
  d1ec1b0de4d949dc7d1dc221ca3dc4f1  download/mythplugins-0.21-gcc_4.4.patch
  aa4e09aec4d3174d57c76ac13222d872   
download/mythplugins-0.21-mythmusic_cdio.patch
  20929c23d1a02638da0e79e0eb2921a1   
download/mythplugins-0.21-mythmusic_fftw3.patch
-1030b31f9b9216fd50a516ea8b6d942d   
download/mythplugins-0.21-mythvideo_tmdb_pl.patch
+3adfff2e71a7d3b0de7bb373c3ffa27b   
download/mythplugins-0.21-mythvideo_tmdb_pl.patch
  56744d2c619afbb0c9ed47f935fe6e64  download/mythplugins-0.21.patch.gar
  9d7a739980cdfa9f42b4a42d569ecbde  download/mythplugins-0.21-init.patch

Modified:  
trunk/gar-minimyth/script/myth-0.21/mythplugins/files/mythplugins-0.21-mythvideo_tmdb_pl.patch
==============================================================================
---  
trunk/gar-minimyth/script/myth-0.21/mythplugins/files/mythplugins-0.21-mythvideo_tmdb_pl.patch
   
(original)
+++  
trunk/gar-minimyth/script/myth-0.21/mythplugins/files/mythplugins-0.21-mythvideo_tmdb_pl.patch
   
Sun May 24 09:22:08 2009
@@ -1,6 +1,6 @@
  diff -Naur  
mythplugins-0.21-20592-old/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm
  
mythplugins-0.21-20592-new/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm
  ---  
mythplugins-0.21-20592-old/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm
         
1969-12-31 16:00:00.000000000 -0800
-+++  
mythplugins-0.21-20592-new/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm
         
2009-05-19 08:08:14.000000000 -0700
++++  
mythplugins-0.21-20592-new/mythvideo/mythvideo/scripts/MythTV/MythVideoCommon.pm
         
2009-05-24 09:04:56.000000000 -0700
  @@ -0,0 +1,238 @@
  +package MythTV::MythVideoCommon;
  +
@@ -242,8 +242,8 @@
  +# vim: set expandtab ts=4 sw=4 :
  diff -Naur mythplugins-0.21-20592-old/mythvideo/mythvideo/scripts/tmdb.pl  
mythplugins-0.21-20592-new/mythvideo/mythvideo/scripts/tmdb.pl
  --- mythplugins-0.21-20592-old/mythvideo/mythvideo/scripts/tmdb.pl     
1969-12-31 16:00:00.000000000 -0800
-+++ mythplugins-0.21-20592-new/mythvideo/mythvideo/scripts/tmdb.pl      
2009-05-19 08:08:14.000000000 -0700
-@@ -0,0 +1,375 @@
++++ mythplugins-0.21-20592-new/mythvideo/mythvideo/scripts/tmdb.pl      
2009-05-24 09:09:33.000000000 -0700
+@@ -0,0 +1,405 @@
  +#!/usr/bin/perl -w
  +
  +# This perl script is intended to perform movie data lookups based on
@@ -365,6 +365,11 @@
  +    my ($rc, $response) =
  +        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
  +
++    if (!defined $response) {
++        die "Unable to contact themoviedb.org while retrieving ".
++            "movie data, stopped";
++    }
++
  +    my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => ['movie'],
  +        KeyAttr => []);
  +    my $xml = $xs->XMLin($response);
@@ -376,8 +381,13 @@
  +        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,
-+            ForceArray => ['category', 'production_countries'],
++            ForceArray => ['category', 'production_countries', 'person'],
  +            KeyAttr => ['key', 'id']);
  +
  +        my $movie = $xml->{moviematches}->{movie};
@@ -481,6 +491,11 @@
  +    my ($rc, $response) =
  +        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
  +
++    if (!defined $response) {
++        die "Unable to contact themoviedb.org while retrieving ".
++            "movie poster, stopped";
++    }
++
  +    my $xml = XMLin($response, ForceArray =>  
['movie', 'poster', 'backdrop'],
  +        KeyAttr => {poster => 'size'});
  +
@@ -504,19 +519,29 @@
  +    my ($rc, $response) =
  +        TMDBAPIRequest('Movie.imdbLookup', {'imdb_id' => "tt$movieid"});
  +
-+    my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => [],
++    if (!defined $response) {
++        die "Unable to contact themoviedb.org while retrieving ".
++            "movie backdrop, stopped";
++    }
++
++    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}->{id};
++        my $tmdbid = $xml->{moviematches}{movie}[0]{id};
  +
  +        my ($rc, $response) =
  +            TMDBAPIRequest('Movie.getInfo', {'id' => $tmdbid});
  +
-+        $xml = XMLin($response, ForceArray=> [], KeyAttr =>  
['key', 'id']);
++        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";
@@ -544,6 +569,11 @@
  +    # get the search results  page
  +    my ($rc, $response) =
  +        TMDBAPIRequest('Movie.search', {'title' => $query});
++
++    if (!defined $response) {
++        die "Unable to contact themoviedb.org while retrieving ".
++            "movie list, stopped";
++    }
  +
  +    my $xs = new XML::Simple(SuppressEmpty => '', ForceArray => ['movie'],
  +        KeyAttr => []);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"minimyth-commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/minimyth-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to