erland;221557 Wrote: 
>  Using the Saver Switcher plugin you can setup the "playing" screen
> saver to alternate between "Now Playing" and "Google Calendar", there
> is also an API in Saver Switcher where you can tell it not to display
> "Google Calendar" unless there is a calendar event in the next hour.

Michael, I'm not aware of anybody other then myself that's using this
API, so by all means contact me if you have any questions or problems.
Hopefully the comments in SaverSwitcher/Public.pm are enough
sufficient, but let me know if not, or if it doesn't seem o behave as
expected!

Another tip: the way screensavers are handled is that each time a
screensaver is invoked, its "mode" is pushed onto the mode stack. When
the player leaves screensaver mode, SlimServer will call functions from
each mode on the stack as it tears down through the screensavers. With
SaverSwitcher potentially changing savers and pushing modes dozens or
hundreds of times in one run of screensavers (as when a player is off
for hours and cycling through screensavers), exiting screensaver mode
could mean calling functions dozens or hundreds of times in a row, so
it's important that the screensavers cache intelligently. A worst-case
scenario here would be Google Calendar querying Google each time it was
invoked on a player; if SlimServer were tearing down a long stack of
screensaver modes, this could not only introduce a delay on the player
that's trying to exit screensaver mode, it could also, because
SlimServer is single-threaded, affect other players. Best case would be
Google Calendar -- much like Greg's excellent SuperDateTime plugin --
caching the information globally and contacting Google no more than
once every N seconds (N = ~30 would probably suffice) unless, like
SuperDateTime's "+" button mapping, explicitly asked to refresh by the
user. The only screensaver I know of (not that I've used then all) that
is particularly bad about this is WeatherTime -- it's pretty much a
worst-case scenario for caching data (no criticism intended; without
SaverSwitcher, WeatherTime's design would probably be perfectly fine).
I've looked into modifying SaverSwitcher to avoid this problem by
manipulating the stack and not allowing it to grow so large, but with
some ugly side effects. So cache that data!

-Peter


-- 
peterw

http://www.tux.org/~peterw/
free plugins: http://www.tux.org/~peterw/#slim
AllQuiet BlankSaver BottleRocket FuzzyTime SaverSwitcher SleepFade
StatusFirst VolumeLock
------------------------------------------------------------------------
peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=37713

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

Reply via email to