Skip to content

Commit

Permalink
Better byte formatting for nzbls
Browse files Browse the repository at this point in the history
  • Loading branch information
techhat committed Sep 10, 2011
1 parent 4e7063d commit 84663e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nzbtools
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ while ( my $file = <INPUT> ) {
$files{$currentfile}{guessedname} = $guessedfilename;
$files{$currentfile}{subject} = $subject;

$widthbytes = length($bytes) + 1 if $widthbytes < length($bytes);
my $formattedbytes = format_bytes( $bytes );
$widthbytes = length($formattedbytes) + 1 if $widthbytes < length($formattedbytes);
$widthdate = length($currentfiledate) + 1 if $widthdate < length($currentfiledate);
$widthname = length($currentfilename) + 1 if $widthname < length($currentfilename);
$widthguessedname = length($guessedfilename) + 1 if $widthguessedname < length($guessedfilename);
Expand Down Expand Up @@ -216,7 +217,6 @@ sub nzbls {
. 's %' . $widthsegments
. 's %' . $widthdate
. 's %-' . $widthposter . 's' . "\n";
warn $printformat;
my @formatted;
for my $key ( keys %files ) {
# print "$files{$key}{name}\n";
Expand Down

0 comments on commit 84663e6

Please sign in to comment.