PDA

View Full Version : Grouping in "Browse by Genre"?



KenGetz
2006-01-06, 10:16
Hi, I'm new to this, so please understand that this may be a common question, and if so, please point me in the right direction...

When I select "Browse by Genre" on either the SlimServer or a hardware device, the next level of grouping is by artist. I need to be able to present the music sorted by album/CD at this point. I can't find a setting that controls this behavior. In other words, I ALWAYS want to browse for music by CD, but would like to be able to categorize by genre to narrow the search. At this point, I can't do that. Any suggestions? Thanks! -- Ken

ceejay
2006-01-06, 10:32
I'm pretty sure this behaviour is hardcoded. I think I remember seeing the code when I was browsing a while ago...

If you are feeling brave and have Perl, you could always try patching the code (disadvantage: you'll need to reapply your patch each time you upgrade).

Or you could submit an enhancement request, or vote for one of the existing requests for more flexible browsing options.

If you want to try the do-it-yourself method then reply to that effect and I'll see if I can find the place in the code where I found it earlier...

Ceejay

Listener
2006-01-06, 10:58
I'm pretty sure this behaviour is hardcoded. I think I remember seeing the code when I was browsing a while ago...

If you want to try the do-it-yourself method then reply to that effect and I'll see if I can find the place in the code where I found it earlier...

Ceejay

Ceejay,

I'd be interested in that information.

I'm glad you are continuing to mention the browsing/searching enhancements # 2696-2701 at

http://bugs.slimdevices.com/

Thanks for your efforts.

Bill

kdf
2006-01-06, 11:04
If you want to try the do-it-yourself method then reply to that effect and I'll see if I can find the place in the code where I found it earlier...

Ceejay

the base code for browsing is found in Slim/Datastores/Base.pm. This has code for creating the data for each level of browsing. Player UI module is Slim/Buttons/BrowseDB and the web is handled by Slim/Web/Pages.pm or more recently Slim/Web/Pages/BrowseDB.pm.

the path (genre->artist->album) is set with the hierarchy parameter in the url, created with the addPageLinks() calls.
-kdf

kdf
2006-01-06, 11:16
using 6.2.2, you can change Slim/Web/Pages.pm line 37:

change to:
addLinks("browse",{'BROWSE_BY_GENRE' => "browsedb.html?hierarchy=genre,album,track&level=0"});

using 6.5b1, this would be a similar change to the hierarchy parameter in Slim/Web/Pages/BrowseDB.pm line 31

for the player UI, this is Buttons/BrowseDB.pm around line 37.

You may even wish to remove the artist item in the heirarchy alltogether, since you can opt to have the artist already shown at the album level (server settings->formatting

If you wish to get into this discussion at length, please feel free to bring it up in the developers forum.

-kdf

KenGetz
2006-01-09, 12:41
Thanks. Although I'm an experienced .NET developer, I sure haven't ever played with PERL. It might be fun, but for now, I think I'll submit the request and just use folders to organize things. Or, if I get a moment, I might try rebuilding the software with this information. Sounds like a fun challenge!

Thanks -- Ken


using 6.2.2, you can change Slim/Web/Pages.pm line 37:

change to:
addLinks("browse",{'BROWSE_BY_GENRE' => "browsedb.html?hierarchy=genre,album,track&level=0"});

using 6.5b1, this would be a similar change to the hierarchy parameter in Slim/Web/Pages/BrowseDB.pm line 31

for the player UI, this is Buttons/BrowseDB.pm around line 37.

You may even wish to remove the artist item in the heirarchy alltogether, since you can opt to have the artist already shown at the album level (server settings->formatting

If you wish to get into this discussion at length, please feel free to bring it up in the developers forum.

-kdf