maihde / roku_subsonic

Roku TV frontend for the Subsonic streaming music server
GNU General Public License v3.0
21 stars 7 forks source link

Implemented album art screensaver and fixed a couple regressions #4

Closed MidnightJava closed 12 years ago

MidnightJava commented 12 years ago

Implemented album art screensaver. Screensaver shows cover art for the currently playing song, whether selected by any means or playing in shuffle mode. If the item has no art, the roku logo is displayed. It's currently hard-wired for smooth animation. I'd like to add a config setting so the user can choose smooth animation or bouncing. What do you think?

I fixed a couple bugs introduced in previous commit, in response to IDE false positive error markers.

  1. I previously changed function Stop on a custom object to f_Stop, to avoid using reserved words. But I erroneously changed an invocation of Stop() on roAudioPlayer to f_Stop() also. The fact that roAudioPlayer has such a method seems to indicate that it's not invalid for custom objects to have functions with such a name, even though the Brightscript reference says use of reserved words for identifiers is not permitted.
  2. I previously changed an array reference from array[index1][index2] to array[index1, index2] to avoid false positive error marker in IDE. But this causes a run-time error (when you browse and select an artist), even though the Brightscript reference says either form is permitted.
MidnightJava commented 12 years ago

For current L462 and L503, I don't see how f_Stop() can be appropriate. The function is being called on an instance of roAudioPlayer, not on the roAssociativeArray named "player". Object roAudioPlayer defines the function as Stop().

MidnightJava commented 12 years ago

Oh never mind. I missed the m pointer. Yes that's a good solution to keep the IDE happy.

MidnightJava commented 12 years ago

Well actually that works for the line in f_Goto(). But what do you do about m.audioPlayer.Stop() in f_Stop()? Seems like that has to stay as is, which the IDE doesn't like.

MidnightJava commented 12 years ago

There are three screensaver modes (smooth, bouncing, and corners), plus a random mode that selects one of these three every minute.

FYI when screensaver scripts are called by the platform, they swallow all output and fail silently (though the app thread continues to run). If you see a blank screen, without the roku logo, this is the likely cause. I have code in the main script commented out that can be used in dev mode to run the screensaver from the main thread in lieu of the app. This way we get debug output and the screensaver runs immediately, instead of waiting 5 min after the app is started.

MidnightJava commented 12 years ago

I just learned form a forum post that the screensaver debug output appears on port 8087.