Исправелн формат background

* исключено создание изображения одного и того же разрешения дважды
legacy27 3.6.0.1
Mike Hiretsky 6 years ago
parent e062735d19
commit 9a67f0410b

@ -213,6 +213,7 @@ class backgrounds(TemplateFormat):
fn = os.path.split(remove_fn)[1]
if re_remove.match(fn):
removed_files.append(remove_fn)
created = set()
if source:
for resolution in resolutions:
rule_match = reRule.search(resolution)
@ -223,6 +224,10 @@ class backgrounds(TemplateFormat):
width, height = rule_match.groups()
width = int(width)
height = int(height)
if (width,height) in created:
continue
else:
created.add((width,height))
if only_one:
image_fn = pathJoin(workdir, prefix)

Loading…
Cancel
Save