diff --git a/oml/meta/openlibrary.py b/oml/meta/openlibrary.py index 2c955f5..7cf527c 100644 --- a/oml/meta/openlibrary.py +++ b/oml/meta/openlibrary.py @@ -136,6 +136,13 @@ def format(info, return_all=False): value = value[0] if key == 'publish_date': value = parse_date(value) + if key == 'publish_places': + for i, v in enumerate(value): + if v.startswith('['): + v = v[1:] + if v.endswith(']'): + v = v[:-1] + value[i] = v data[KEYS[key]] = value if 'subtitle' in info: data['title'] += ' ' + info['subtitle'] diff --git a/static/js/infoView.js b/static/js/infoView.js index 248f0ae..cfcc69d 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -113,10 +113,11 @@ oml.ui.infoView = function(identifyData) { function formatValue(value, key) { return value ? (Ox.isArray(value) ? value : [value]).map(function(value) { + if (key == 'date' && value) { + value = value.slice(0, 4); + } return key && !identifyData ? - '' + value + '' + '' + value + '' : value; }).join('; ') : ''; }