[BACK]Return to CurrentTorrents.pl CVS log [TXT][DIR] Up to [local] / openbsd / OpenBSDTorrents

Diff for /openbsd/OpenBSDTorrents/CurrentTorrents.pl between version 1.37 and 1.38

version 1.37, 2010/03/16 23:40:18 version 1.38, 2010/03/22 21:36:28
Line 1 
Line 1 
 #!/usr/bin/perl -T  #!/usr/bin/perl -T
 #$RedRiver: CurrentTorrents.pl,v 1.36 2010/03/16 22:37:32 andrew Exp $  #$RedRiver: CurrentTorrents.pl,v 1.37 2010/03/16 22:40:18 andrew Exp $
 use strict;  use strict;
 use warnings;  use warnings;
 use diagnostics;  use diagnostics;
Line 60 
Line 60 
   
         #print "Adding $DIR/$_\n";          #print "Adding $DIR/$_\n";
   
         if (exists $files{$ext}{$name}{$epoch}) {          my $ct = {
             warn "Multiple torrents with $name and epoch $epoch\n";  
             push @delete, $files{$ext}{$name}{$epoch};  
         }  
   
         $files{$ext}{$name}{$epoch} = {  
             file => $_,              file => $_,
             dir  => $DIR,              dir  => $DIR,
             #path => "$DIR/$_",              #path => "$DIR/$_",
Line 83 
Line 78 
         if ( $name =~ m/\A $OBT->{BASENAME} /xms          if ( $name =~ m/\A $OBT->{BASENAME} /xms
             && !exists $Possible_Torrents{$name} )              && !exists $Possible_Torrents{$name} )
         {          {
             #print "Would remove $_\n";              print "Would remove impossible $_\n";
             push @delete, $files{$ext}{$name}{$epoch};              push @delete, $ct;
           }
           else {
                   if ($files{$ext}{$name}{$epoch}) {
                       warn "Multiple torrents with $name and epoch $epoch\n";
                       push @delete, $files{$ext}{$name}{$epoch};
                   }
   
                   $files{$ext}{$name}{$epoch} = $ct;
         }          }
   
     }      }
     closedir DIR;      closedir DIR;
 }  }
Line 278 
Line 282 
         foreach my $file (@$files) {          foreach my $file (@$files) {
             if ( $file =~ /$INSTALL_ISO_REGEX/ ) {              if ( $file =~ /$INSTALL_ISO_REGEX/ ) {
                 Make_Possible("$dir/$file");                  Make_Possible("$dir/$file");
               }
               elsif ( $file =~ /$SONG_REGEX/xms ) {
                   Make_Possible("$dir/$1");
             }              }
         }          }
     }      }

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>