mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 22:12:53 +01:00
Merge pull request #1073 from multikatt/discogs_encodeerr
Problem with non-ascii characters when using the discogs plugin and oauth PR
This commit is contained in:
commit
208aedfa87
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ class DiscogsPlugin(BeetsPlugin):
|
|||
# cause a query to return no results, even if they match the artist or
|
||||
# album title. Use `re.UNICODE` flag to avoid stripping non-english
|
||||
# word characters.
|
||||
query = re.sub(r'(?u)\W+', ' ', query).encode('utf8')
|
||||
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(r'(?i)\b(CD|disc)\s*\d+', '', query)
|
||||
|
|
|
|||
Loading…
Reference in a new issue