Skip to content

Commit

Permalink
add some error handling in case the formatted lyrics isn't proper htm…
Browse files Browse the repository at this point in the history
…l markup
  • Loading branch information
Scott Horowitz committed Jan 26, 2008
1 parent a8294a3 commit e8a71fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sonata.py
Expand Up @@ -2973,12 +2973,15 @@ def info_show_lyrics(self, lyrics, artist, title, force=False):
if force:
# For error messages where there is no appropriate artist or
# title, we pass force=True:
self.lyricsText.set_markup(lyrics)
self.lyricsText.set_text(lyrics)
elif self.status and self.status.state in ['play', 'pause'] and self.songinfo:
# Verify that we are displaying the correct lyrics:
try:
if strip_all_slashes(self.songinfo.artist) == artist and strip_all_slashes(self.songinfo.title) == title:
self.lyricsText.set_markup(lyrics)
try:
self.lyricsText.set_markup(lyrics)
except:
self.lyricsText.set_text(lyrics)
except:
pass

Expand Down

0 comments on commit e8a71fa

Please sign in to comment.