SVN: toys/rsget.pl/Audio/Gazeta

sparky sparky at pld-linux.org
Sun Dec 19 18:28:08 CET 2010


Author: sparky
Date: Sun Dec 19 18:28:08 2010
New Revision: 11997

Modified:
   toys/rsget.pl/Audio/Gazeta
Log:
- fixed RSGETPL-50


Modified: toys/rsget.pl/Audio/Gazeta
==============================================================================
--- toys/rsget.pl/Audio/Gazeta	(original)
+++ toys/rsget.pl/Audio/Gazeta	Sun Dec 19 18:28:08 2010
@@ -22,8 +22,13 @@
 	my ( $len ) = /^Content-Length:\s*(\d+)\r?$/mi;
 	$len ||= -1;
 
-	! $-{_uri} =~ m{#/([^/]+?)(?:\.mp3)?$};
-	my $fname = uri_unescape( $1 ) . ".mp3";
+	my $fname;
+	if ( $-{_uri} =~ m{#/([^/]+?)(?:\.mp3)?$} ) {
+		$fname = uri_unescape( $1 ) . ".mp3";
+	} else {
+		! $-{_uri} =~ m{.*/(.*?)(#.*?)?$};
+		$fname = uri_unescape( $1 );
+	}
 
 	INFO( name => $fname, size => $len, quality => "mp3" );
 


More information about the pld-cvs-commit mailing list