Explorar o código

Allow no-decimal sizes

Zachary Kotlarek %!s(int64=14) %!d(string=hai) anos
pai
achega
d35d818113
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      findTorrent.pl

+ 1 - 1
findTorrent.pl

@@ -425,7 +425,7 @@ foreach my $tr (@trs) {
 	# Extract the size
 	my $size = 0;
 	my $unit = 'M';
-	if ($tr =~ m/(\d+\.\d+)\&nbsp\;(G|M)iB\<\/[tT][dD]\>/) {
+	if ($tr =~ m/(\d+(?:\.\d+)?)\&nbsp\;(G|M)iB\<\/[tT][dD]\>/) {
 		$size = $1;
 		$unit = $2;
 		if ($unit eq 'G') {