Description
Using the Spotify plugin, it is unable to correctly search for albums & artists with Chinese/Japanese characters as its being converted to Ascii before the search. Resulting in 0 results from spotify.
Searches instead should keep the characters as the original (like how MusicBrainz works) so Spotify can return the correct results as spotify doesn't support searching with Pinyin/Romaji
Problem
With a folder containing songs from 盗作 - ヨルシカ (or any album/artist using Chinese characters)
Running this command in verbose (-vv
) mode:
$ beet -vv import . -t
Led to this problem:
spotify: Searching Spotify for 'album:Dao Zuo artist:yorushika'
spotify: Found 0 result(s) from Spotify for 'album:Dao Zuo artist:yorushika'
The album name is getting converted to ascii when searched, resulting in 0 results.
In this case, 盗作 -> Dao Zuo
The album it should be finding:
https://open.spotify.com/album/6pZ0SrZCP8Bm28L6JhMtBy?si=X2sNSW5oTAGuJBNaVCAD0w
Setup
- OS: Arch Linux
- Python version: 3.13.2
- beets version: 2.2.0
My configuration (output of beet config
) is:
directory: ~/Music
plugins:
- embedart
- fetchart
- lyrics
- lastgenre
- spotify
- scrub
import:
move: yes
spotify:
source_weight: 0.0
mode: open
show_failures: on
This is most likely due to unidecode.unidecode(query)
which converts all characters into ascii prior to the search.
Lines 399 to 407 in 030fd1f