From: Jonathan Neuschäfer Date: Sat, 3 Apr 2010 19:35:35 +0000 (+0200) Subject: screen_lyrics.c: Add function delete_lyr_hd X-Git-Tag: release-0.17~14 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d320986038e35262a657abd46cc608a709fb0961;p=ncmpc.git screen_lyrics.c: Add function delete_lyr_hd --- diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index 6cb7b46..173fc5a 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -138,6 +138,21 @@ store_lyr_hd(void) return 0; } +static int +delete_lyr_hd(void) +{ + char path[1024]; + + if (!exists_lyr_file(current.artist, current.title)) + return -1; + + path_lyr_file(path, 1024, current.artist, current.title); + if (unlink(path) != 0) + return -2; + + return 0; +} + static void screen_lyrics_set(const GString *str) {