Ticket #3664: mythrename.pl.diff

File mythrename.pl.diff, 776 bytes (added by Roo, 14 years ago)

Catch error from $show->load_file_info() and process next file

  • mythrename.pl

     
    241241    # File doesn't exist locally
    242242        next unless (-e $show->{'local_path'});
    243243    # Load info about the file so we can determine the file type
    244         $show->load_file_info();
     244        eval { $show->load_file_info() };
     245        if ($@) {
     246            warn "Unable to get file info for '".$show->{'basename'}."'\n".$@."\n";
     247            next;
     248        }
    245249    # Format the name
    246250        my $name = $show->format_name($format,$separator,$replacement,$dest,$underscores);
    247251    # Get a shell-safe version of the filename (yes, I know it's not needed in this case, but I'm anal about such things)