make local lookup opt in

This commit is contained in:
j 2016-01-07 18:03:56 +05:30
parent a765f52f8a
commit 67ad0a82e9
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ def lookup_provider(arg):
def lookup(key, value):
if not isvalid_id(key, value):
return {}
if not settings.server.get('local_lookup'):
import oml.metaremote
return oml.metaremote.lookup(key, value)
if key == 'isbn':
data = google.info(key, value)
else: