Bug 7085 - infobrowser items are empty
: infobrowser items are empty
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugin
: 7.0
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-11 20:18 UTC by KDF
Modified: 2009-09-08 09:11 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description KDF 2008-02-11 20:18:32 UTC
when descending to the last level of infobrowser, the items come up blank, with the following error in jive console:
191616:40774 ERROR (RequestHttp.lua:67) - Response sink:...share/jive/applets/InfoBrowser/InfoBrowserApplet.lua:107: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
	...ne/jive/build/osx/share/jive/jive/utils/coxpcall.lua:28: in function <...ne/jive/build/osx/share/jive/jive/utils/coxpcall.lua:26>
	(tail call): ?
	(tail call): ?
	(tail call): ?
	...e/jive/build/osx/share/jive/jive/net/RequestHttp.lua:64: in function 'snk'
	...sers/fishbone/jive/build/osx/share/lua/5.1/ltn12.lua:262: in function 'mySink'
	.../jive/build/osx/share/jive/jive/net/CometRequest.lua:135: in function 't_setResponseBody'
	...ne/jive/build/osx/share/jive/jive/net/SocketHttp.lua:596: in function 'snk'
	...sers/fishbone/jive/build/osx/share/lua/5.1/ltn12.lua:277: in function 'step'
	...ne/jive/build/osx/share/jive/jive/net/SocketHttp.lua:662: in function 'pump'
	...one/jive/build/osx/share/jive/jive/net/SocketTcp.lua:202: in function 'readPump'
	...shbone/jive/build/osx/share/jive/jive/net/Socket.lua:143: in function <...shbone/jive/build/osx/share/jive/jive/net/Socket.lua:141>



This seems to start being a problem as of SC change 17354 which is a response to bug 7024.
fix appears to be a partial reversion of that change:

Index: Slim/Buttons/XMLBrowser.pm
===================================================================
--- Slim/Buttons/XMLBrowser.pm	(revision 17424)
+++ Slim/Buttons/XMLBrowser.pm	(working copy)
@@ -1377,6 +1377,8 @@
 			# This is a leaf item, so show as much info as we have and go packing after that.		
 			if (	$isItemQuery &&
 					(
+						!defined($subFeed->{'items'}) || 	 
+						scalar(@{$subFeed->{'items'}}) == 0 ||
 						$subFeed->{'type'} eq 'audio' || 
 						$subFeed->{'enclosure'} 
 					)

This, however, means bug 7024 isn't fixed right, so it may be that infobrowser applet needs a tweak. It's awfully hard to track matching changes between SC and Jive.
Comment 1 KDF 2008-02-11 20:36:30 UTC
here is a possible fix:
Index: Slim/Buttons/XMLBrowser.pm
===================================================================
--- Slim/Buttons/XMLBrowser.pm	(revision 17424)
+++ Slim/Buttons/XMLBrowser.pm	(working copy)
@@ -1377,6 +1377,7 @@
 			# This is a leaf item, so show as much info as we have and go packing after that.		
 			if (	$isItemQuery &&
 					(
+						$subFeed->{'description'} ||
 						$subFeed->{'type'} eq 'audio' || 
 						$subFeed->{'enclosure'} 
 					)


However, I cannot test it's effects on bug 7024 as it pertains to Rhapsody and an artist with no items.  If there is a description value, this will clearly be an issue.  If not, then it should be a fix.  As I am too far north to be affected by Rhapsody, the above fix works here :)
Comment 2 Blackketter Dean 2008-02-12 06:31:08 UTC
Triode & Andy: what do you think?


Comment 3 Blackketter Dean 2008-02-12 09:28:44 UTC
Andy: what do you think of this patch?
Comment 4 Adrian Smith 2008-02-12 11:16:56 UTC
I agree with kdf's patch.  change 17353 stops sending infobrowser data for the leaf nodes.  Adding this back in if there is a description fixes it - shall I commit?
Comment 5 Andy Grundman 2008-02-12 11:20:29 UTC
Yeah, that patch looks fine.
Comment 6 Adrian Smith 2008-02-12 11:53:15 UTC
Fixed in change 17447
Comment 7 Chris Owens 2008-03-07 09:03:32 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.