I went through the source code of upmpdcli. I hate trying to navigate C++ code.... Looks like this is the problem in upmpd.cxx starting at line 621
it = setnext? sc.args.find("NextURI") : sc.args.find("CurrentURI");
if (it == sc.args.end() || it->second.empty()) {
return UPNP_E_INVALID_PARAM;
}
It's returning "UPNP_E_INVALID_PARAM if the NextURI string is empty.
The problem is "UPNP_E_INVALID_PARAM" is never declared anywhere else in the code, it doesn't have a value linked to it anywhere and I can't see any handling of a call and what it does when that value is returned. As upmpdcli is a front end for Music Player Deamon, I figured it must be something MPD uses. I went through the MPD source code and there is no reference to that response at all. I guess it's some fixed value in Linux?
None of that answers why the plugin creates thousands of log entries. It's configured so if the response to the SetNextAVTransportURI is not 200, it will only try 3 times before it stops trying completely. And even if that failsafe didn't kick in, it's set to run on a fixed System Timer so the absolute most it should be logging is 10x per second. I just can't see any way for the SetNext code to be executed thousands of times. It's bizarre.
All I can do is ad an option so the plugin doesn't send a blank NextURI but that might cause the player to just repeat the last song over and over again. Musicbee is supposed to stop if I call NextTrackPlayStarted and there is no next track in the now playing list so that might make everything work ok for you.
edit: looks like that response code is part of libupnp, it's a neverending rabbit hole....