From 4094d7bc3a5b5ce43429639aa2c7a213a748bddb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Oct 2009 19:09:26 +0200 Subject: [PATCH] mpdclient: fall back to simple "deleteid" if range is 1 --- src/mpdclient.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mpdclient.c b/src/mpdclient.c index 30e0fe6..e380ac0 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -544,6 +544,11 @@ mpdclient_cmd_delete_range(struct mpdclient *c, unsigned start, unsigned end) struct mpd_connection *connection; struct mpd_status *status; + if (end == start + 1) + /* if that's not really a range, we choose to use the + safer "deleteid" version */ + return mpdclient_cmd_delete(c, start); + connection = mpdclient_get_connection(c); if (connection == NULL) return false; -- 2.30.2