Bugzilla – Bug 8978
Add support for remote fullscreen artwork
Last modified: 2008-12-15 12:05:47 UTC
Following up yesterday's discussion on campfire I did some digging. Seems to be much simpler than I thought. Maybe a bit simplistic, but here's what seems to be working fine for me: Index: /Users/mh/Documents/workspace/SqueezePlay/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua =================================================================== --- /Users/mh/Documents/workspace/SqueezePlay/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua (revision 2747) +++ /Users/mh/Documents/workspace/SqueezePlay/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua (working copy) @@ -643,7 +643,13 @@ end log:debug("Artwork width/height will be ", shortDimension) - _server:fetchArtworkThumb(chunk.data.artworkId, icon, shortDimension) + + if string.match(chunk.data.artworkId, "^http://") then + _server:fetchArtworkURL(chunk.data.artworkId, icon, shortDimension) + else + _server:fetchArtworkThumb(chunk.data.artworkId, icon, shortDimension) + end + popup:addWidget(icon) popup:show() return popup
I think I'd rather have SC sending stuff to Jive with elements that are appropriate to the data. This would require a couple simple changes on both SC and Jive sides: === Queries.pm ================================================================== --- Queries.pm (revision 24920) +++ Queries.pm (local) @@ -5733,7 +5733,12 @@ # get our parameters my $id = $request->getParam('_artworkid'); - $request->addResult('artworkId' => $id); + if ($id =~ /:\/\//) { + $request->addResult('artworkUrl' => $id); + } else { + $request->addResult('artworkId' => $id); + } + $request->addResult('offset', 0); $request->setStatusDone(); === SlimBrowserApplet.lua ================================================================== --- SlimBrowserApplet.lua (revision 24812) +++ SlimBrowserApplet.lua (local) @@ -643,7 +643,11 @@ end log:debug("Artwork width/height will be ", shortDimension) - _server:fetchArtworkThumb(chunk.data.artworkId, icon, shortDimension) + if chunk.data and chunk.data.artworkId then + _server:fetchArtworkThumb(chunk.data.artworkId, icon, shortDimension) + elseif chunk.data and chunk.data.artworkUrl then + _server:fetchArtworkURL(chunk.data.artworkUrl, icon, shortDimension) + end popup:addWidget(icon) popup:show() return popup
we don't want to forget this, do we? :-P
guess what? the server side change has been in for four weeks :-). Change 23187 - probably an accidental checkin, as the checkin log doesn't mention it.
change 3086 - add artworkUrl handler to SlimBrowser
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.