boysetsfrog / vimpc

Official repository for vimpc a vi/vim inspired client for the Music Player Daemon (mpd). Pull requests are welcome.
GNU General Public License v3.0
269 stars 34 forks source link

All tracks in lib added to current playlist on lost focus #105

Open littlecoce opened 1 year ago

littlecoce commented 1 year ago

Hey all,

Using: Arch Linux Sway 1.8.1 Alacritty 0.12.2 (9d9982df) vimpc 0.09.1 [95ad78d112316a1c290a480481fd1f8abf50b59b] mpd 0.23.13

When opening vimpc in alacritty, on lost focus all tracks are added to my playlist. This happens no matter in which tab I'm currently in. journalctl does not log anything related and I don't find any other log files.

Tests with kitty do NOT show this behavior.

Is this the right place for this report?

iyra commented 1 year ago

I think I'm also facing this issue (using Arch and xmonad though) - couldn't figure out why this was happening, but it's frustrating, especially given that my library is quite large.

pasha-dushny commented 11 months ago

Same issue with i3wm on Archlinux

nathan-whittington commented 6 months ago

This one has been bugging me for a while. I don't understand the code well enough to make an official PR but this fixed the issue for me:

diff --git a/src/mpdclient.cpp b/src/mpdclient.cpp
index a4516ca..c462e31 100644
--- a/src/mpdclient.cpp
+++ b/src/mpdclient.cpp
@@ -1389,7 +1389,7 @@ void Client::AddAllSongs()
       if (Connected() == true)
       {
          Debug("Client::Add all songs");
-         mpd_send_add(connection_, "");
+         // mpd_send_add(connection_, "");
       }
       else
       {

I mainly use vimpc as a way to view my current playlist so who knows what I broke with this change...