Use b'' in discogs medium query regex

Since the first arg to `re.sub()` is bytes, thus must be the
replacement string.
This commit is contained in:
Johnny Robeson 2016-09-20 17:38:39 -04:00
parent 009108627d
commit 6b73aa25d2

View file

@ -200,7 +200,7 @@ class DiscogsPlugin(BeetsPlugin):
query = re.sub(r'(?u)\W+', ' ', query).encode('ascii', "replace")
# Strip medium information from query, Things like "CD1" and "disk 1"
# can also negate an otherwise positive result.
query = re.sub(br'(?i)\b(CD|disc)\s*\d+', '', query)
query = re.sub(br'(?i)\b(CD|disc)\s*\d+', b'', query)
try:
releases = self.discogs_client.search(query,
type='release').page(1)