From: Modestas Vainius <modax@debian.org>
Date: Thu, 28 Jul 2011 16:02:26 +0300
Subject: [PATCH] Fix lyrics autorefresh in some cases.
Forwarded: http://git.reviewboard.kde.org/r/102110/
Origin: vendor

There were some issues mostly when playing streams. Lyrics would stuck with
empty text and wouldn't autorefresh until the track was changed or manually
refreshed. That's because cachedLyrics() is always empty for streams. Therefore
it makes sense to additionally check if either artist or track title have
changed as well.
---
 src/context/engines/lyrics/LyricsEngine.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/context/engines/lyrics/LyricsEngine.cpp b/src/context/engines/lyrics/LyricsEngine.cpp
index 2abeb6d..e6188fc 100644
--- a/src/context/engines/lyrics/LyricsEngine.cpp
+++ b/src/context/engines/lyrics/LyricsEngine.cpp
@@ -66,7 +66,10 @@ void LyricsEngine::onTrackMetadataChanged( Meta::TrackPtr track )
     DEBUG_BLOCK
 
     // Only update if the lyrics have changed.
-    if( m_prevLyrics.text != track->cachedLyrics() )
+    QString artist = track->artist() ? track->artist()->name() : QString();
+    if( m_prevLyrics.artist != artist ||
+        m_prevLyrics.title != track->name() ||
+        m_prevLyrics.text != track->cachedLyrics() )
         update();
 }
 
-- 
1.7.5.4

