Bugzilla – Bug 7012
Now Playing art doesn't always work when on SN
Last modified: 2009-09-08 09:23:29 UTC
I have no idea why this happens, but NP artwork sometimes stops working if you're on SN.
Andy: Can you tell if Jive is requesting the artwork at all? How often have you seen this?
I think from what Andy described we should have this on the 7.0 target list for now. If we see it's not a readily reproducible problem, then move it to 7.0.1.
The importance of this is proportional to how often it happens. :)
Possibly related to this: after a while the radio and music services icons no longer work.
http logging would be helpful. Andy and Steven note that sometimes it affects all artwork, not just album art. Richard notes switching between SqueezeCenter and SqueezeNetwork might make this happen.
I've found one way to reliably trigger the bug while on SN: switch over to SomaFM for a while (or presumably any random noncommercial radio stream with no official icon/artwork). Once you've hit NowPlaying / Screensaver / whatever a few times the artwork fetch queue will be permanently full and icons/artwork will break everywhere (unless they're already cached I guess). I've found two ways to fix this. I'm not 100% sure either of them is completely correct, but WorksForMe. At Andy's suggestion I committed the simpler (higher-level) of the two so it would make tonight's nightly build, but Richard may well replace that with something better. The simpler fix I committed: Index: jive/share/jive/net/RequestHttp.lua =================================================================== --- jive/share/jive/net/RequestHttp.lua (revision 1914) +++ jive/share/jive/net/RequestHttp.lua (working copy) @@ -346,6 +346,9 @@ end end else + if not err then + err = "HTTP request failed with code" .. code + end sink(nil, err) end end The deeper fix which makes the above unecessary, but I'm not very confident about whether is the The Right Thing: Index: jive/share/jive/net/SocketHttp.lua =================================================================== --- jive/share/jive/net/SocketHttp.lua (revision 1914) +++ jive/share/jive/net/SocketHttp.lua (working copy) @@ -363,7 +363,7 @@ if data then statusCode = tonumber(data) - statusLine = chunk + statusLine = chunk or statusCode else self:close(err) return ------ In either case, the bottom line for the artwork thing is that if the http layer calls the artwork sink with no chunk data and no error code (due to, say, a 404 error which produced no statusLine), the count of outstanding artwork fetches doesn't get decremented, which leaks one of the 4 entries and eventually leads to no artwork being fetched at all.
Actually this looks like a bug during refactoring, the patch should be: Index: jive/share/jive/net/SocketHttp.lua =================================================================== --- jive/share/jive/net/SocketHttp.lua (revision 1914) +++ jive/share/jive/net/SocketHttp.lua (working copy) @@ -363,7 +363,7 @@ if data then statusCode = tonumber(data) - statusLine = chunk + statusLine = line else self:close(err) return I'll include this in my http pipelining changes today.
Fixed in r1916. Brandon, can you please test this.
Richard: r1916 works as far as the original artwork issue goes (but then again r1915's change is still in there, which would mask the underlying problem anyways). But I think the other half of r1916 (pipelining stuff) has introduced some related new bug. Ben and Andy are saying on softjive the first icon in menus like Internet Radio or Music Services is missing, but the rest are fine (but scrolling down and back up fixes it). I also had some problems getting Pandora to play at all on real hardware, until I played it via the SN Web UI first, then it started working...
Richard made another fix in r1918 that seems to have cleared all related issues up, at least for me. If there's anything new it probably needs to be a new bug. Anyone else watching this still able to reproduce artwork issues w/ r1918?
Marking as fixed. Please reopen if you can reproduce.
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1 Please try that version, if you still see the error, then reopen this bug. To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html