Bug 1524 - skinnable html for livesearch
: skinnable html for livesearch
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.1.0
: PC All
: P2 enhancement (vote)
: Future
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-11 15:34 UTC by Michael Herger
Modified: 2008-12-15 13:06 UTC (History)
0 users

See Also:
Category: ---


Attachments
make livesearch skinnable (5.61 KB, patch)
2007-08-27 05:34 UTC, Michael Herger
Details | Diff
don't reinvent the wheel - use existing sub routine to fill the result page (6.48 KB, patch)
2007-08-27 06:30 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2005-05-11 15:34:49 UTC
Livesearch (Slim::Music::Livesearch.pm) contains some hard coded HTML which will work with some 
skins, but won't with others.

And there's some hard coded english text, too...
Comment 1 Michael Herger 2005-05-18 13:17:31 UTC
Change 3158 added translations. Still a lot of hard coded HTML...
Comment 2 KDF 2005-05-18 14:03:14 UTC
I think it will be tricky to take away all the hardcoded stuff.  Most of it
should be ok (conforming to stylesheets).  The graphics are the big problem.  If
those could be handled through teh stylesheet, then the code could reference a
class.  This would then be useful for all skins, since those button links get
used over and over per skin
Comment 3 Michael Herger 2005-05-18 14:15:10 UTC
I underestimated this one. I thought about storing the records in an array and loop through them in the 
template. I'll give it a try tomorrow. 
Comment 4 Michael Herger 2005-05-18 22:55:56 UTC
Just read the header in Livesearch.pm:

# Todo - call filltemplate stuff instead? May be too slow.

And is there a reason why it's not using the itemsPerPage setting but its own constant MAXRESULTS?
Comment 5 KDF 2005-05-19 00:29:20 UTC
none of the alpha-sorted browse lists seem to follow itemsPerPage properly
anyway.  I'm beginning to think it is a useless setting since only browse
artwork and browse playlists still adhere to it.  browse artwork already hsa a
bug request to get rid of items per page, and playlists can easily fit into
alpha lists as well.

In the case of MAXRESULTS, it seemd to me to make sense becuase you have
multiple sets of results from livesearch, so it doesn't work as well with
itemsperpage. It might also be that live search is desired to be much faster, so
returning only 10 results is fast, followed by a link that simply does an old
style search result to grab the rest of the matching tracks. I've   never had a
case where I have enough artists/albums matching in order to see what happens
with those results when it is over MAXRESULTS.

now that SN is out, maybe the @slim boys can be let out of the cages to answer
some of these questions with definitive answers :)
Comment 6 Michael Herger 2005-05-19 00:42:27 UTC
What was irritating me is that the standard (non-live, hitting the search button) search does respect 
itemsPerPage. But there are other problems with this mode, too: the number of items found will only be 
songs, but not the sum of songs, artists and albums. And the pagebar is only paging songs, but not the 
other items. 
Comment 7 Dan Sully 2005-05-19 00:43:58 UTC
What kdf said is correct - itemsPerPage could apply to livesearch, but the default is too large to be 
reasonable. Also, I'm tired of giving knobs to everyone, when there shouldn't always been knobs.

The MAXRESULTS constant was meant to apply to each section in the search: Artist, Album & Tracks.
Comment 8 Dan Sully 2005-05-19 00:44:12 UTC
What kdf said is correct - itemsPerPage could apply to livesearch, but the default is too large to be 
reasonable. Also, I'm tired of giving knobs to everyone, when there shouldn't always been knobs.

The MAXRESULTS constant was meant to apply to each section in the search: Artist, Album & Tracks.
Comment 9 Blackketter Dean 2005-06-07 16:36:37 UTC
Dan: what needs to get done here for 6.1?
Comment 10 Blackketter Dean 2005-06-13 17:32:09 UTC
Dan says that the english text has been removed by Herger, so we now need a patch to use skinnable 
files.
Comment 11 KDF 2005-08-09 10:25:41 UTC
retitling for what still remains.  marking as enhancement since current
hard-coding does work for its designed purpose.
Comment 12 Michael Herger 2007-08-27 05:34:22 UTC
Created attachment 2119 [details]
make livesearch skinnable

I'd like to make the livesearch use templates. Otherwise I'd have to re-implement the search page in JS/JSONRPC for the new Default skin to be anywhere close to the other browse lists.
Comment 13 Michael Herger 2007-08-27 06:30:42 UTC
Created attachment 2120 [details]
don't reinvent the wheel - use existing sub routine to fill the result page
Comment 14 Michael Herger 2007-08-28 00:22:09 UTC
I've checked the above patch in, as it's needed for the new skin to work properly
Change 12754
Comment 15 James Richardson 2008-12-15 13:06:37 UTC
This bug appears to have been fixed in the latest release!

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.

Make sure to include the version number of the software you are seeing the error with.