Fix Python 2.6 compatibility

This commit is contained in:
Jayme 2013-05-30 09:30:00 +02:00
parent 46340af6b7
commit 32e1c13510

View file

@ -157,7 +157,7 @@ class DiscogsPlugin(BeetsPlugin):
# Strip disambiguation number.
name = re.sub(r' \(\d+\)$', '', name)
# Move articles to the front.
name = re.sub(r'^(.*?), (a|an|the)$', r'\2 \1', name, flags=re.I)
name = re.sub(r'(?i)^(.*?), (a|an|the)$', r'\2 \1', name)
bits.append(name)
if artist['join']:
bits.append(artist['join'])