diff --git a/templates/dups.html b/templates/dups.html index 73d57e0..4bbf8c4 100644 --- a/templates/dups.html +++ b/templates/dups.html @@ -49,7 +49,7 @@ $('[id^=kf' + row + '-f]').attr('class', 'alert alert-danger sm-txt py-1') $('[id^=kf' + row + '-f]').attr('class', 'alert alert-danger sm-txt py-1') $('#kf'+row+'-f'+which).attr('class', 'alert alert-' + al + ' py-1') - $('#kfname-'+row).val( F[row.toString()+which.toString()] ) + $('#kfid-'+row).val( F[row.toString()+which.toString()] ) } function KeepDir(row, which) { @@ -67,9 +67,12 @@ {% set pref=namespace(have="") %} {% set count=namespace( del=0, keep=0 ) %} {% set all_count=namespace( d_files=0, k_files=0, manual=0 ) %} + {% set kfid=namespace( count=0 ) %} {# for each hash in ip_to_sp_dups_*, auto keep the _keep, auto delete the _del, only need hidden input #} {% for h in DD.ip_to_sp_dups_keep %} - + {% set kfid.count = kfid.count+1 %} + + {% set count.keep = count.keep+1 %} {% set count.del = count.del + DD.ip_to_sp_dups_del[h]|length %} {% endfor %} @@ -88,7 +91,9 @@ {% if DD.preferred_file[dup.h] %} {% set pref.have = "True" %} {% if DD.preferred_file[dup.h] == dup.id %} - + {% set kfid.count = kfid.count+1 %} + + {% set count.keep = count.keep + 1 %} {% else %} {% set count.del = count.del + (dups|length-1) %} @@ -101,21 +106,21 @@ {% if page.cnt <= pagesize %} {% if loop.index == 1 %}