[mythtv-users] : tmdb.pl grabber API 2.0 no longer available

Yan-Fa Li yanfali at gmail.com
Tue Jun 15 04:17:46 UTC 2010


On Mon, Jun 14, 2010 at 11:39 AM, Wayne Thomas <waynethomas69 at gmail.com> wrote:
> For anyone that is interested, attached is a diff to patch the current
> tmdb.pl script to work with the new API version 2.1.
>
> It could use a lot of tidying up but it works and I have no intention
> of spending more time on it (unless there is an actual problem with
> it).  Good luck and enjoy.
>
> Cheers
> Wayne
>

Thanks!  It works for me.  I did find a small bug when the cast xml is
empty and dirty hacked around it.  Since the real solution is upgrade
to 0.23 I think this is ok.

--- tmdb.pl	2010-06-14 21:13:40.260172182 -0700
+++ tmdb.pl.new	2010-06-14 21:13:30.673495236 -0700
@@ -195,7 +195,8 @@
         my $dc = 0;
         my $cc = 0;
         my $wc = 0;
-        if (exists $xml->{movies}->{movie}->{cast}) {
+	my $empty = $xml->{movies}->{movie}->{cast};
+        if ($empty ne "" && exists $xml->{movies}->{movie}->{cast}) {
             my @castlist = @{$xml->{movies}->{movie}->{cast}->{person}};
             for (my $i = 0; $i < @castlist; $i++)
             {




Yan


More information about the mythtv-users mailing list