(trunk, web) r13437 regex bugfix by cfpp2p

This commit is contained in:
Jordan Lee 2012-09-19 05:28:13 +00:00
parent 624c8ff1cc
commit fe42c6285d
1 changed files with 2 additions and 2 deletions

View File

@ -618,10 +618,10 @@ function Inspector(controller) {
$($('.inspector_torrent_file_list_entry_name',$('#'+parentid))[0]).click(function() { $($(this).parent()).children('li').toggle(); })
sum = 0
matches = $('#'+parentid).children('li').text().match(/\([^\)]+\)/g)
matches = $('#'+parentid).children('li').text().match(/\([^\.]+\)/g)
if (matches == null) { continue; }
matches.map(function(word) {return parseFloat(word.slice(1,-2)) }).map(function(perc) {sum+=perc})
count = $('#'+parentid).children('li').text().match(/\([^\)]+\)/g).length
count = $('#'+parentid).children('li').text().match(/\([^\.]+\)/g).length
totalcomplete = (sum/count).toFixed(1)
$($('.inspector_torrent_file_list_entry_progress',$('#'+parentid))[0]).text('('+totalcomplete+'%)')