Revert "Enqueue from search list goes to wrong song"
authorMax Kellermann <max@musicpd.org>
Tue, 4 Sep 2018 07:59:22 +0000 (09:59 +0200)
committerMax Kellermann <max@musicpd.org>
Tue, 4 Sep 2018 07:59:22 +0000 (09:59 +0200)
This reverts commit 08f864133ccf92c5839257531dab73827dd3d148.  The
commit causes an endless loop when deselecting a song in the database
browser.

NEWS
src/Queue.cxx

diff --git a/NEWS b/NEWS
index d8a939a..cd34eeb 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,4 @@
 ncmpc 0.31 - not yet released
-* fix "No such song" in search screen
 * fix progressbar when colors are disabled
 * keep current song in xterm title when MPD is paused
 * load configuration from $XDG_CONFIG_HOME/ncmpc/config
index de48ab9..f3bd612 100644 (file)
@@ -90,7 +90,7 @@ MpdQueue::FindUri(const char *filename) const
        for (size_type i = 0; i < size(); ++i) {
                const auto &song = (*this)[i];
                if (strcmp(mpd_song_get_uri(&song), filename) == 0)
-                       return mpd_song_get_id(&song);
+                       return i;
        }
 
        return -1;