Fixes Next Selection in Remote Falcon for shows whose scheduled playlist is
set to randomize, and makes the plugin much lighter on small controllers.
Changed
- The plugin puts much less load on FPP. It checks FPP's status every
second during a show, and each check used to make FPP gather network and
system details the plugin never used. It now asks FPP's player directly,
which takes a few milliseconds instead of up to half a second on a
BeagleBone or Pi Zero. Thanks to dkulp.
Fixed
- Next Selection now matches what actually plays next on a random
playlist. FPP shuffles a random playlist when it plays it but keeps the
saved playlist in your original order, and the plugin was reading the saved
order. So Playing Now was right while Next Selection usually wasn't, and
switching between "Randomize once per load" and "Randomize every
iteration" didn't help. The plugin now asks FPP for the order it is really
playing. With "Randomize once per load", Next Selection is right for every
song. With "Randomize every iteration", it's right for every song except the
last one of each pass. FPP picks the next shuffle only when that pass ends,
so nobody can know that song ahead of time. - A stopped FPP is now noticed. If the FPP player was stopped, the plugin
kept acting as if it were running. It now logs "FPPD is not running!" and
clears Playing Now and Next Selection in Remote Falcon, so viewers don't see
the last song as still playing. - Playing a single sequence (not from a playlist) no longer makes the
plugin look it up every second. Thanks to dkulp.