From 31d7b47521f6663ccb30d36ae7b0ac8ed0c3127f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 23 Sep 2008 12:08:14 +0200 Subject: screen_lyrics: set current.song The variable current.song was never set, thus the cache did not work. Don't reset it in screen_lyrics_clear() (which is called from screen_lyrics_set()). --- src/screen_lyrics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index c2c780723..cfc658939 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -79,8 +79,6 @@ screen_lyrics_clear(void) assert(current.loader == NULL || lyrics_result(current.loader) == LYRICS_SUCCESS); - current.song = NULL; - for (i = 0; i < current.lines->len; ++i) g_free(g_ptr_array_index(current.lines, i)); @@ -162,6 +160,8 @@ screen_lyrics_load(struct mpd_song *song) screen_lyrics_abort(); screen_lyrics_clear(); + current.song = song; + strfsong(buffer, sizeof(buffer), "%artist%", song); current.artist = g_strdup(buffer); -- cgit v1.2.3