From c834599b428547abe3fcc7ba1d274265a773ca78 Mon Sep 17 00:00:00 2001 From: jmwatte Date: Mon, 13 Apr 2015 10:46:47 +0200 Subject: [PATCH] fix regex --- beetsplug/replaygain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index e07117609..e19101e3e 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -216,9 +216,9 @@ class Bs1770gainBackend(Backend): out = [] data = text.decode('utf8', errors='ignore') regex = re.compile( - ur'(\s{2,2}\[\d+\/\d+\].*?|\[ALBUM\].*?\ - )(?=\s{2,2}\[\d+\/\d+\]|\s{2,2}\[ALBUM\]:|done\.\s\ - )', re.DOTALL | re.UNICODE) + ur'(\s{2,2}\[\d+\/\d+\].*?|\[ALBUM\].*?)' + '(?=\s{2,2}\[\d+\/\d+\]|\s{2,2}\[ALBUM\]' + ':|done\.\s)', re.DOTALL | re.UNICODE) results = re.findall(regex, data) for parts in results[0:num_lines]: part = parts.split(b'\n')