From 932d05b8e3b596e587541c30eda7b9b4170779a5 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 27 Mar 2021 14:24:27 +1100 Subject: [PATCH] improved duplicate counting, removed concept of sets, and validated counts work via DB selects, and they do --- templates/dups.html | 66 +++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/templates/dups.html b/templates/dups.html index d5173a9..7cea30e 100644 --- a/templates/dups.html +++ b/templates/dups.html @@ -5,8 +5,7 @@
- + - - -
- {% set page.cnt = page.cnt + 1 %} + {% else %} + {% set all_count.manual = all_count.manual + 1 %} + {% if page.cnt <= pagesize %} +
+
Choose path to KEEP (same file names in 2 different directories):
+ {{dup.count}} duplicates in: + {% if dup.d1 == "" %} + {% set d1="/" %} + {% else %} + {% set d1=dup.d1 %} + {% endif %} + {% if dup.d2 == "" %} + {% set d2="/" %} + {% else %} + {% set d2=dup.d2 %} + {% endif %} + + {{d1}} or + {{d2}} + + + +
+ {% set page.cnt = page.cnt + 1 %} + {% endif %} {% endif %} {% endfor %} {% if count.keep_d %}
{% set auto.str = auto.str + "
  • Keeping {} files in {} paths, Deleting={} file in {} paths
  • ".format( count.keep_f, count.keep_d, count.keep_f, count.keep_d) %} - {% set all_count.sets = all_count.sets + count.keep_d %} {% set all_count.k_files = all_count.k_files + count.keep_f %} {% set all_count.d_files = all_count.d_files + count.keep_f %}
    @@ -187,7 +189,7 @@ {{auto.str|safe}} Automatically Keeping {{all_count.k_files}} files and deleting {{all_count.d_files}} files
    - Leaving {{DD.overall_dup_sets-all_count.sets}} manual choices to make (to delete a further {{DD.overall_dup_cnt-all_count.d_files}} files) + Leaving {{all_count.manual}} manual choices to make (to keep {{DD.uniq_dups-all_count.k_files}} files and delete {{DD.total_dups-all_count.d_files}} files) {% endif %}