version 1.36, 2010/03/16 23:37:32 |
version 1.37, 2010/03/16 23:40:18 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
#$RedRiver: CurrentTorrents.pl,v 1.35 2010/03/08 20:19:35 andrew Exp $ |
#$RedRiver: CurrentTorrents.pl,v 1.36 2010/03/16 22:37:32 andrew Exp $ |
use strict; |
use strict; |
use warnings; |
use warnings; |
use diagnostics; |
use diagnostics; |
|
|
|
|
#print "Adding $DIR/$_\n"; |
#print "Adding $DIR/$_\n"; |
|
|
if (exists $files{$ext}{$name}{$epoch}) { |
if (exists $files{$ext}{$name}{$epoch}) { |
warn "Multiple torrents with $name and epoch $epoch\n"; |
warn "Multiple torrents with $name and epoch $epoch\n"; |
} |
push @delete, $files{$ext}{$name}{$epoch}; |
|
} |
|
|
$files{$ext}{$name}{$epoch} = { |
$files{$ext}{$name}{$epoch} = { |
file => $_, |
file => $_, |
|
|
or die "Couldn't rename '$file': $!"; |
or die "Couldn't rename '$file': $!"; |
|
|
$dir = $OBT->{DIR_TORRENT}; |
$dir = $OBT->{DIR_TORRENT}; |
$keep{$hash}{dir} = $dir; |
$keep{$hash}{dir} = $dir; |
|
|
if ( exists $files{txt}{$name}{$epoch} ) { |
if ( exists $files{txt}{$name}{$epoch} ) { |
my $m_file = $files{txt}{$name}{$epoch}{file}; |
my $m_file = $files{txt}{$name}{$epoch}{file}; |