KVerb wrote: 
> I tried that but I was still able to leave the SBs hanging at high
> volume and/or without restarting their playlist after multiple
> refreshes. It seems handleJSONP() still gets called on every http GET
> and interrupts playlistStoppedCallback() before it can reset the SBs to
> their previous state. I think I'd have to somehow un-dispatch the
> LMSannounce URL temporarily? Is that even a thing?
> 
> EDIT: I changed my code a bit and now the playlistStoppedCallback() is
> always properly completed in my tests so it seems that handleJSONP()
> does not interrupt playlistStoppedCallback().
> Any request that is sent while an earlier request is still processing
> now gets an error message response. The only disadvantage is that the
> squeezebox server can only handle one http GET at a time so the error
> response only comes after the earlier request is fully completed. This
> is not something that can be fixed inside the plugin.
> Another option that I'll explore is to add a loop inside handleJSONP()
> that only continues after the lock variable is set to "unlocked".
LMS is single-threaded, so any kind of blocking in a plugin should be
avoided. That's why I wrote that  a clean solution would require some
effort, as you'd have to implement some sort of threading/async behavior
yourself (you can pass LMS' executeRequest call a subroutine which will
be executed when it's finished, but this won't help here and in any case
would only work if the client uses AJAX)



'Various SW' (https://www.nexus0.net/pub/sw/): Web Interface | TUI |
Playlist Editor / Generator | Music Classification | Similar Music |
Announce | EventTrigger | DB Optimizer | Image Enhancer | Chiptunes |
LMSlib2go | ...
'Various HowTos' (https://www.nexus0.net/pub/documents/LMS/): build a
self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
------------------------------------------------------------------------
Roland0's Profile: http://forums.slimdevices.com/member.php?userid=56808
View this thread: http://forums.slimdevices.com/showthread.php?t=109096

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to