mirror of
https://github.com/beetbox/beets.git
synced 2026-01-05 23:43:31 +01:00
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:
parent
009108627d
commit
6b73aa25d2
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue