diff options
author | Max Kellermann <max@duempel.org> | 2008-09-23 12:08:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-23 12:08:14 +0200 |
commit | 31d7b47521f6663ccb30d36ae7b0ac8ed0c3127f (patch) | |
tree | 5ffbfd2b0f3812d7e664c1197f05727b33b23f0b /src | |
parent | 1870dd377ce49bc5aea9de06041797bb9a0ac365 (diff) | |
download | mpd-31d7b47521f6663ccb30d36ae7b0ac8ed0c3127f.tar.gz mpd-31d7b47521f6663ccb30d36ae7b0ac8ed0c3127f.tar.xz mpd-31d7b47521f6663ccb30d36ae7b0ac8ed0c3127f.zip |
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()).
Diffstat (limited to 'src')
-rw-r--r-- | src/screen_lyrics.c | 4 |
1 files 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); |