There's a few things about the code that I think needs some attention to make it more robust. First, for each line of text or image, it makes a separate request, and each of these requests is done in parallel (assync, right?). I think they can step on each other if there's some lag, or an error, and that's probably not good. We could easily send SDT an array/table of request strings and have it process them all at once.
Might be tricky to do in CustomClock, since it's geared towards reading in the config data and getting results right away. But you could have it building up the request array, and then have it go to a function that: 1. Checks to see if the data is updated, if not, use cached information. 2. Sends the appropriate request, gets results, and parses them for all strings. Also, this block of text doesn't process if the player is in play mode. Is there a reason for that? It looks like the playerStatus.mode isn't necessary, since it will never (?) call this routine unless the ScreenSaver timeout has occurred, right? > > function _getLocalizedWeatherInfo(self,time,text,no) > > local player = appletManager:callService("getCurrentPlayer") > local playerStatus = player:getPlayerStatus() > log:debug("Received text: "..text) > > if playerStatus.mode ~= 'play' or > self:getSettings()["nowplaying"] == false then > ... > end > -Dan -- plympton ------------------------------------------------------------------------ plympton's Profile: http://forums.slimdevices.com/member.php?userid=12955 View this thread: http://forums.slimdevices.com/showthread.php?t=77864 _______________________________________________ jive mailing list jive@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/jive