dont extract text if extract_text is false

This commit is contained in:
j 2016-02-19 14:42:19 +05:30
parent 97d4aea892
commit 9f396acd48

View file

@ -206,9 +206,9 @@ def info(pdf):
del data[key] del data[key]
if key == 'language': if key == 'language':
data[key] = get_language(data[key]) data[key] = get_language(data[key])
text = extract_text(pdf)
data['textsize'] = len(text)
if settings.server['extract_text']: if settings.server['extract_text']:
text = extract_text(pdf)
data['textsize'] = len(text)
if not 'isbn' in data: if not 'isbn' in data:
isbn = extract_isbn(text) isbn = extract_isbn(text)
if isbn: if isbn: