allow things like [3.jpg, 3.5.jpg] to override the minimum level delta check

This commit is contained in:
xenofem 2024-03-29 13:55:22 -04:00
parent f2d71014cd
commit d0cd88c289

View file

@ -757,7 +757,7 @@ def complete_prefix_number_ordering(entries):
cur = unified_indices[i] cur = unified_indices[i]
prev = unified_indices[i-1] prev = unified_indices[i-1]
for level in range(min(len(cur), len(prev))): for level in range(min(len(cur), len(prev))):
if cur[level] != prev[level]: if cur[level] != prev[level] and not (cur[level] == 5 and prev[level] == 0):
delta = cur[level] - prev[level] delta = cur[level] - prev[level]
min_delta_by_level[level] = min(min_delta_by_level.get(level, delta), delta) min_delta_by_level[level] = min(min_delta_by_level.get(level, delta), delta)
if any(delta > 2 for delta in min_delta_by_level.values()): if any(delta > 2 for delta in min_delta_by_level.values()):