Merge branch 'master' into gutenberg2
commit
e8aa14fc0d
|
@ -66,12 +66,13 @@ class XMLishFormatter (BaseFormatter.BaseFormatter):
|
||||||
if file_.filetype and file_.filetype.endswith('images'):
|
if file_.filetype and file_.filetype.endswith('images'):
|
||||||
dedupable[file_.filetype] = file_
|
dedupable[file_.filetype] = file_
|
||||||
do_dedupe = False
|
do_dedupe = False
|
||||||
for ft in ['epub', 'kindle', 'pdf']:
|
for ft in ['epub', 'kindle', 'pdf', 'html']:
|
||||||
if ft + '.images' in dedupable and ft + '.noimages' in dedupable:
|
if ft + '.images' in dedupable and ft + '.noimages' in dedupable:
|
||||||
if dedupable[ft + '.images'].extent == dedupable[ft + '.noimages'].extent:
|
# because of timestamps, identical files may vary by a bit or 2
|
||||||
|
if abs (dedupable[ft + '.images'].extent - dedupable[ft + '.noimages'].extent) < 3:
|
||||||
do_dedupe = True
|
do_dedupe = True
|
||||||
if do_dedupe:
|
if do_dedupe:
|
||||||
for ft in ['epub', 'kindle', 'pdf']:
|
for ft in ['epub', 'kindle', 'pdf', 'html']:
|
||||||
if ft + '.images' in dedupable and ft + '.noimages' in dedupable:
|
if ft + '.images' in dedupable and ft + '.noimages' in dedupable:
|
||||||
dc.files.remove(dedupable[ft + '.images'])
|
dc.files.remove(dedupable[ft + '.images'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue