IndexError while trying to fetch lyrics from Dark Lyrics
After trying to fetch the lyrics for a song which from a band named "緑黄色社会", one of the parsers raised this error:
Traceback (most recent call last):
File "/usr/lib64/rhythmbox/plugins/rb/Loader.py", line 36, in call_callback
v = callback(data, *args)
File "/usr/lib64/rhythmbox/plugins/lyrics/TerraParser.py", line 93, in got_lyrics
callback (None, *data)
File "/usr/lib64/rhythmbox/plugins/rb/Coroutine.py", line 61, in callback
self._resume ()
File "/usr/lib64/rhythmbox/plugins/rb/Coroutine.py", line 46, in _resume
next(self._continuation)
File "/usr/lib64/rhythmbox/plugins/lyrics/LyricsParse.py", line 54, in searcher
parser.search(plexer.send())
File "/usr/lib64/rhythmbox/plugins/lyrics/DarkLyricsParser.py", line 51, in search
firstcharurl = 'http://www.darklyrics.com/%s.html' % (self.artist_ascii[0])
IndexError: string index out of range
It seems that this code expects an artist with at least one ascii char in it's name.
Steps to reproduce
- Open Rhythmbox from the terminal
- Enable "Song Lyrics" plugin
- Disable all other sources except Dark Lyrics
- Open any file's properties and edit it's artist metadata to a non ascii one (this plugin seems to display weird behaviour for numeric artist names too)
- Open the Lyrics tab
- Wait for the terminal output (Rhythmbox will only show "Searching for lyrics..." indefinitely)
System information
OS: Fedora 36 (GNOME 42.3.1)
Rhythmbox 3.4.6