From: Max Kellermann Date: Sat, 10 Oct 2009 17:09:26 +0000 (+0200) Subject: mpdclient: fall back to simple "deleteid" if range is 1 X-Git-Tag: release-0.16~124 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4094d7bc3a5b5ce43429639aa2c7a213a748bddb;p=ncmpc.git mpdclient: fall back to simple "deleteid" if range is 1 --- 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;