Hello all,


Some time ago i wrote a plugin for "audio bookmarks" (named "BookmarkHistory").
This plugin subscribes to the playlist loadtracks","playlist loadalbum" and "playlist addtracks events.

In the callback function it then retrieves the playlist of the player which triggered the event. The code is:

Code:
	my $numberoftracks = preferences('server')->get('maxPlaylistLength');
	$request = Slim::Control::Request::executeRequest($client, ['status', 0 , $numberoftracks , 'tags:egu']);
The plugin then sends a command to jump to the bookmarked track in the playlist. After that, another callback is triggered which jumps to the stored position in the track.
I use it all the time and even if the code is terrible (perl is definitely not my preferred language...) it works reliably for me.

One user now reported that the plugin does not work for him. It creates the bookmarks, but if he plays a boookmarked album the playback does not jump to the correct track.

I did a bit debugging with him and discovered that the status request returns

Code:
 waitingToPlay            => 1
It seems that in this case the status command does not return the playlist for the client.

In the CLI doc is just described as:
A flag telling whether the player isn't actually playing, but still waiting for data or something.
Whatever "something" means :-> ....


The user has the server installed on an pretty old Synology DS1512+ NAS and he says that he has fast network connections between server and clients (Squeezebox Radio and a squeezeplay installation). I am not familiar with Synology products, but from the spec sheet this looks beefy enough to run a squeezeserver (At least it has 1GB RAM).

I am unable to reproduce the issue. I tried throttling cpu and network speed to a ridiculous low value and built a playlist with far more than 1000 tracks. It takes about 20s until the playback starts, but the plugin works without a problem.
I added some more debugging statements and it looks to me as if on my server the status query needs a few seconds to execute - but it never just returns with a waitingToPlay=1 value.

So i am a bit lost here. Does anybody have a hint for me?

Is this a really weird thing specific to his installation? Or could this happen also for other users? But as i said above: I never noticed that on one of my installations - even not on a crappy old banana pi i use for testing and as a backup installation.

Is it possible to provoke this waitingToPlay=>1 response? Or a recommended way to handle this in a callback function? I searched through the forum but was not able to find something useful.

Thanks a lot for any hint.