mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
fixed lyrics fetching of untagged songs
This commit is contained in:
parent
48d54779a5
commit
d257984e12
@ -2466,6 +2466,8 @@ class LyricsWindow(FocusFrame):
|
|||||||
|
|
||||||
def _display_lyrics(self, current_song):
|
def _display_lyrics(self, current_song):
|
||||||
GLib.idle_add(self._text_buffer.set_text, _("searching..."), -1)
|
GLib.idle_add(self._text_buffer.set_text, _("searching..."), -1)
|
||||||
|
text=None
|
||||||
|
if current_song.get("artist", "") != "" and current_song.get("title", "") != "":
|
||||||
text=self._lyrics_helper.get_lyrics(current_song["artist"], current_song["title"])
|
text=self._lyrics_helper.get_lyrics(current_song["artist"], current_song["title"])
|
||||||
if text is None:
|
if text is None:
|
||||||
text=_("lyrics not found")
|
text=_("lyrics not found")
|
||||||
@ -2475,6 +2477,7 @@ class LyricsWindow(FocusFrame):
|
|||||||
current_song=self._client.wrapped_call("currentsong")
|
current_song=self._client.wrapped_call("currentsong")
|
||||||
if current_song == {}:
|
if current_song == {}:
|
||||||
self._displayed_song_file=None
|
self._displayed_song_file=None
|
||||||
|
self._text_buffer.set_text("", -1)
|
||||||
else:
|
else:
|
||||||
self._displayed_song_file=current_song["file"]
|
self._displayed_song_file=current_song["file"]
|
||||||
update_thread=threading.Thread(
|
update_thread=threading.Thread(
|
||||||
|
Loading…
Reference in New Issue
Block a user