SVN: toys/rsget.pl/RSGet: Get.pm HTTPRequest.pm
sparky
sparky at pld-linux.org
Mon Oct 12 02:14:41 CEST 2009
Author: sparky
Date: Mon Oct 12 02:14:41 2009
New Revision: 10759
Modified:
toys/rsget.pl/RSGet/Get.pm
toys/rsget.pl/RSGet/HTTPRequest.pm
Log:
- set fsize and fname also for uri that started the download
Modified: toys/rsget.pl/RSGet/Get.pm
==============================================================================
--- toys/rsget.pl/RSGet/Get.pm (original)
+++ toys/rsget.pl/RSGet/Get.pm Mon Oct 12 02:14:41 2009
@@ -343,7 +343,8 @@
$self->bestinfo();
RSGet::FileList::save( $self->{_uri},
- globals => { fname => $fname, fsize => $fsize } );
+ globals => { fname => $fname, fsize => $fsize },
+ options => { fname => $fname, fsize => $fsize } );
RSGet::FileList::update();
}
Modified: toys/rsget.pl/RSGet/HTTPRequest.pm
==============================================================================
--- toys/rsget.pl/RSGet/HTTPRequest.pm (original)
+++ toys/rsget.pl/RSGet/HTTPRequest.pm Mon Oct 12 02:14:41 2009
@@ -261,11 +261,12 @@
{
my ( $list_ids, $id_type, $uri, $getter, $o, $tools ) = @_;
- my $bestname = $o->{name} || $o->{iname}
+ my $bestname = $o->{fname} || $o->{name} || $o->{iname}
|| $o->{aname} || $o->{ainame};
$bestname = sgml( $bestname || "???" );
- my $bestsize = $o->{size} ? bignum( $o->{size} ) . " bytes" :
+ my $bestsize = $o->{fsize} ? bignum( $o->{fsize} ) . " bytes":
+ $o->{size} ? bignum( $o->{size} ) . " bytes" :
$o->{asize} ? sgml( $o->{asize} ) :
$o->{quality} ? sgml( $o->{quality} ) : "?";
if ( $o->{link1} ) {
@@ -278,7 +279,7 @@
my $uriid = makeid( $list_ids, $id_type, $uri, $uri );
my $color = "blue";
- $color = "green" if $o->{size} or $o->{asize} or $o->{quality};
+ $color = "green" if $o->{fsize} or $o->{size} or $o->{asize} or $o->{quality};
$color = "red" if $o->{error};
$color = "orange" if exists $RSGet::Dispatch::downloading{ $uri };
More information about the pld-cvs-commit
mailing list