Merge remote-tracking branch 'origin/master' into bs1770gain-v0.6.0-parsing

# Conflicts:
#	docs/changelog.rst
This commit is contained in:
ybnd 2020-02-05 08:42:11 +01:00
commit 1ab46c69be
2 changed files with 11 additions and 1 deletions

View file

@ -395,13 +395,21 @@ class Genius(Backend):
song_info = None
for hit in json["response"]["hits"]:
if hit["result"]["primary_artist"]["name"] == artist:
# Genius uses zero-width characters to denote lowercase
# artist names.
hit_artist = hit["result"]["primary_artist"]["name"]. \
strip(u'\u200b').lower()
if hit_artist == artist.lower():
song_info = hit
break
if song_info:
self._log.debug(u'fetched: {0}', song_info["result"]["url"])
song_api_path = song_info["result"]["api_path"]
return self.lyrics_from_song_api_path(song_api_path)
else:
self._log.debug(u'genius: no matching artist')
class LyricsWiki(SymbolsReplaced):

View file

@ -151,6 +151,8 @@ Fixes:
* :doc:`/plugins/bpd`: Fix the transition to next track when in consume mode.
Thanks to :user:`aereaux`.
:bug:`3437`
* :doc:`/plugins/lyrics`: Fix a corner-case with Genius lowercase artist names
:bug:`3446`
* :doc:`/plugins/replaygain`: Support ``bs1770gain`` v0.6.0 and up
:bug:`3480`