Author: sparky
Date: Fri Sep 11 19:09:22 2009
New Revision: 10573

Modified:
   toys/rsget.pl/Get/DepositFiles
   toys/rsget.pl/Get/FileFactory
Log:
- mark incomplete name


Modified: toys/rsget.pl/Get/DepositFiles
==============================================================================
--- toys/rsget.pl/Get/DepositFiles      (original)
+++ toys/rsget.pl/Get/DepositFiles      Fri Sep 11 19:09:22 2009
@@ -10,7 +10,10 @@
 
        ERROR( "file not found" ) if /Such file does not exist /;
        ! m{<div class="info">.*?<b .*?>(.*?)</b>\s*<span 
.*?>.*?<b>(\d+(\.\d+)?)&nbsp;([KM]B)</b></span>}s;
-       INFO( name => $1, size => "$2 $4" );
+       my $name = $1;
+       my $size = "$2 $4";
+       $name =~ s/\.\.\. (\..{1,5})$/\0$1/;
+       INFO( iname => $name, asize => $size );
        RESTART( 5 * 60, "servers overloaded" )
                if /We are sorry, but all downloading slots for your country 
are busy/;
        

Modified: toys/rsget.pl/Get/FileFactory
==============================================================================
--- toys/rsget.pl/Get/FileFactory       (original)
+++ toys/rsget.pl/Get/FileFactory       Fri Sep 11 19:09:22 2009
@@ -12,7 +12,9 @@
        ! m{<h1>(<a.*?</a>|<img .*?/>)&nbsp;(.*?)(<span.*?</span>)?</h1>\s*<div 
id="info" class="metadata">\s*<span>([\d\.]+ [KM]B) file uploaded}s;
        my ( $name, $size ) = ( $2, $4 );
        $name =~ s/&#8203;//g;
-       INFO( name => $name, size => $size );
+       $name =~ s/\.\.\.$/\0/;
+       $-{_referer} =~ m{.*/(.*?)$};
+       INFO( iname => $name, aname => $1, asize => $size );
        
        MULTI() if /You are currently downloading/;
        if ( /starthtimer[\s\S]*timerend=d\.getTime\(\)\+(\d+);/m ) {
@@ -30,7 +32,7 @@
 
        DOWNLOAD( $-{file_uri} );
 
-       # file turned out to be html, meens we need to wait
+       # file turned out to be html, means we have to wait
        MULTI() if /You are currently downloading too many files at once/;
        RESTART( $1 * 60 - 30, "free limit reached" )
                if /Please wait (\d+) minutes to download more files/;
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to