From 705ae60fdb4dbd8ab759b0eb35d29a6d70de23ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Wed, 14 Jan 2009 11:42:49 +0100 Subject: [PATCH] Fix mapping of Turntable(s) --- picard/mbxml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/picard/mbxml.py b/picard/mbxml.py index 2ba685a27..8af731fe5 100644 --- a/picard/mbxml.py +++ b/picard/mbxml.py @@ -49,9 +49,10 @@ def _decamelcase(text): return re.sub(r'([A-Z])', r' \1', text).strip() +_REPLACE_MAP = {'TurntableS': 'Turntable(s)'} _EXTRA_ATTRS = ['Guest', 'Additional', 'Minor'] def _parse_attributes(attrs): - attrs = map(_decamelcase, attrs) + attrs = [_decamelcase(_REPLACE_MAP.get(a, a)) for a in attrs] prefix = ' '.join([a for a in attrs if a in _EXTRA_ATTRS]) attrs = [a for a in attrs if a not in _EXTRA_ATTRS] if len(attrs) > 1: