aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_sticker.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-04-28 20:23:27 +0200
committerMax Kellermann <max@duempel.org>2009-04-28 20:23:27 +0200
commit610940a06dc09fc14581cffc2829358e926ec9c3 (patch)
treed625b3f12f3cdc7221dd63876a783cbae20ecae2 /src/song_sticker.c
parent7d9316a52d935ce6c9f4ae3030c975d660a02db6 (diff)
downloadmpd-610940a06dc09fc14581cffc2829358e926ec9c3.tar.gz
mpd-610940a06dc09fc14581cffc2829358e926ec9c3.tar.xz
mpd-610940a06dc09fc14581cffc2829358e926ec9c3.zip
sticker: added sticker_delete_value()
sticker_delete_value() deletes only one value in a sticker, while the old function sticker_delete() deletes all values.
Diffstat (limited to '')
-rw-r--r--src/song_sticker.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/song_sticker.c b/src/song_sticker.c
index 131519bcd..2758ff534 100644
--- a/src/song_sticker.c
+++ b/src/song_sticker.c
@@ -75,6 +75,22 @@ sticker_song_delete(const struct song *song)
return ret;
}
+bool
+sticker_song_delete_value(const struct song *song, const char *name)
+{
+ char *uri;
+ bool success;
+
+ assert(song != NULL);
+ assert(song_in_database(song));
+
+ uri = song_get_uri(song);
+ success = sticker_delete_value("song", uri, name);
+ g_free(uri);
+
+ return success;
+}
+
struct sticker *
sticker_song_get(const struct song *song)
{