Skip to content

Commit

Permalink
prevent duplicates and be verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
halkeye committed Jun 26, 2010
1 parent 070472e commit 2d8123f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fixMythbusters.pl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
{
my $info = $tvdb->getEpisode($series, $season, $epNum);
next unless $info->{'EpisodeName'};
die "Duplicate named ep - $info->{'EpisodeName'}" if $realEpMap->{$info->{'EpisodeName'}};

$realEpMap->{$info->{'EpisodeName'}} = {
'epNum' => $info->{'EpisodeNumber'},
Expand Down Expand Up @@ -67,6 +68,7 @@
my $newFileName = sprintf("%s - S%02dE%02d - %s%s",
$series, $info->{season}, $info->{epNum}, $row->{epName}, $suffix
);
warn($oldFilename, " /home/halkeye/downloads/MythBusters/$newFileName\n");
File::Copy::copy($oldFilename, "/home/halkeye/downloads/MythBusters/$newFileName")
or warn("unable to copy $oldFilename: $!");
}
Expand Down

0 comments on commit 2d8123f

Please sign in to comment.