Bug 7019 - SlimBrowser doesn't handle empty lists properly
: SlimBrowser doesn't handle empty lists properly
Status: CLOSED FIXED
Product: SB Controller
Classification: Unclassified
Component: Browser
: unspecified
: Other Other
: P1 normal (vote)
: 7.0
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-07 14:56 UTC by Wallace Lai
Modified: 2008-05-15 13:03 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wallace Lai 2008-02-07 14:56:49 UTC
Jive FW:  7.0 r1841

Steps to Reproduce:
1.  Connect Jive to SN.
2.  Update FW to the latest.
3.  On Jive, go to the Music Services and pick Rhapsody.
4.  Go to PC and Sign in.
5.  On Jvie, go to Rhasody's "Search".
6.  Search by artist.  Type in "BONY TYLER".
7.  Notice Jive returns nothing.
8.  Search by key word.  Type in "TOTAL ECLIPSE".
9.  Notice Jive does not return anything.
Comment 1 Wallace Lai 2008-02-07 16:47:19 UTC
Succeeded in serching for "EAGLE".  Jive returned many names with "EAGLE" in them, such as ""Eagle", "The Eagles", and "The Eagles (1960)".
Is it possible that Rhapsody does not know about Bony Tyler and the "Total eclipse of the heart"?
Comment 2 Andy Grundman 2008-02-07 17:18:44 UTC
The way to find that out is to perform the same search in the web UI, player UI, etc.  The lists should be the same.
Comment 3 Andy Grundman 2008-02-08 05:23:31 UTC
Hmm, interesting.  A search for 'ABBA' works fine, but indeed 'BONY TYLER' does not.  Also, Jive keeps requesting the search over and over while sitting on the empty results screen.  'BONY TYLER' works fine in the web UI.
Comment 4 Andy Grundman 2008-02-08 05:26:42 UTC
The same thing occurs in SC, so I'm changing this to a Jive bug.
Comment 5 Andy Grundman 2008-02-08 05:30:02 UTC
The problem is SC is returning an empty list, and Jive just keeps requesting it.  Assigning to Ben.

Cometd request: [
  {
    channel => "/slim/request",
    data => {
          request  => [
                        "00:04:20:10:01:6a",
                        [
                          "rhapsodydirect",
                          "items",
                          0,
                          200,
                          "item_id:2.0",
                          "menu:rhapsodydirect",
                          "search:BONY TYLER",
                        ],
                      ],
          response => "/7fa8051a/slim/request",
        },
    id => 3322,
  },
]
[08:28:49.1761] Slim::Web::Cometd::handleRequest (779) Request for /7fa8051a/slim/request / 3322 is not async
[08:28:49.1764] Slim::Web::Cometd::Manager::deliver_events (209) Sending event on channel /7fa8051a/slim/request to 7fa8051a
[08:28:49.1774] Slim::Web::Cometd::Manager::deliver_events (223) Delivering events to 7fa8051a:
[
  {
    channel => "/7fa8051a/slim/request",
    data => {
          # tied Tie::IxHash
          count  => 0,
          window => {},
        },
    ext => { priority => "" },
    id => 3322,
  },
]
Comment 6 Andy Grundman 2008-02-08 05:43:27 UTC
This code is the problem, anyone know what it's for?  This is not how search is supposed to work.

		# allow searching in the name field
		if ($search && @{$subFeed->{'items'}}) {
			my @found = ();
			my $i = 0;
			for my $item ( @{$subFeed->{'items'}} ) {
				if ($item->{'name'} =~ /$search/i || $item->{'title'} =~ /$search/i) {
					$item->{'_slim_id'} = $i;
					push @found, $item;
				}
				$i++;
			}
			
			$subFeed->{'items'} = \@found;
		}
Comment 7 Andy Grundman 2008-02-08 06:06:42 UTC
OK, I've removed that chunk of code in change 17334 and it fixes these Rhapsody searches.  There is still a SlimBrowser bug when items = 0.
Comment 8 Andy Grundman 2008-02-08 10:58:09 UTC
FYI, same thing happens with Music Library -> Search -> Artists -> search for something with no results.
Comment 9 Wallace Lai 2008-02-08 16:48:52 UTC
Good news.  Tried the latest FW -- 7.0 r1853.  The search for Bony Tyler works just fine.  Looks like this bug has been fixed.
Should this be marked as "FIXED"?
Comment 10 KDF 2008-02-08 22:33:42 UTC
would be nice to have a change number from Ben on this one.  I saw it go in but don't recall the exact rev.
Comment 11 Ben Klaas 2008-02-09 09:42:06 UTC
jive r1873 closes an infinite request loop that was occurring when the count for a search was 0, but there's still a little more work to be done on the SC side here.

What I'd like to see happen is that for all queries that return nothing, a single item gets sent to jive with an appropriate string (e.g., 'Nothing Found'). I'm working on that.
Comment 12 Ben Klaas 2008-02-09 15:07:34 UTC
fixed in SC change 17368
Comment 13 James Richardson 2008-05-15 13:03:24 UTC
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