Ticket #6574: tmdb.pl_6574_v1.patch

File tmdb.pl_6574_v1.patch, 750 bytes (added by Michelle Agnew <mythtvtrac@…>, 15 years ago)

Proper handling of movies with no categories

  • mythvideo/mythvideo/scripts/tmdb.pl

     
    159159        my $genres;
    160160        my @lgenres;
    161161        if (exists $xml->{moviematches}->{movie}->{categories}) {
    162             my @catlist =
    163                 @{$xml->{moviematches}->{movie}->{categories}->{category}};
     162            my @catlist;
     163            @catlist = @{$xml->{moviematches}->{movie}->{categories}->{category}}
     164                if ref $xml->{moviematches}->{movie}->{categories};
    164165            if (@catlist > 0) {
    165166                my $j = 0;
    166167                for (my $i = 0; $i < @catlist; $i++)