<?sphp $this->text('pagetitle') ?>
 
Home of the Squeezebox™ & Transporter® network music players.

Setup dynamic menu to browse music by tags

From SqueezeboxWiki

Revision as of 21:23, 8 May 2008 by Erland (Talk | contribs)
Jump to: navigation, search

Contents

Overview

This example show how you can setup a dynamic browse menu that allows to you browse your music in any order and number of level. The idea is that it should be possible to browse the music by any relevant tag, independent if it is supported by standard SlimServer or not. The example is based on classical music but the same principles can be use for other type of information.

Look at this example as a guide how to use the "Dynamic Tag" menu type which is added when using the Custom Browse plugin and Custom Scan plugin, the exact tags and menu structures used is not that important, the main purpose is to show some of the possibilities with these plugins.

Lets say we like to setup a browse menu structure like this on the main level:

Classical Music
  Albums
  Artists
  Composers
  Conductors
  Genres
  Works

When browsing down into "Composers" all composers should be shown, when we select a specific composer we should again get a choice of which tag to browse down into further of if we like to see the matching albums/songs. For example like this:

Classical Music
  Albums
  Artists
  Composers
    Beethoven
      Albums
      Artists
      Conductors
      Works
      Genres
      Matching Albums
      Matching Songs
    Mozart
  Conductors
  Genres
  Works

When browsing right when standing on single song we would also like to see a "Tags" menu besides the standard elements already available there, that has the following main menu structure.

Classical Music
  Albums
  Artists
  Composers
  Conductors
  Genres
  Works

The values below "Works", "Composers", Artists" and "Genres" should be limited to those of the selected song, this makes it possible to find other classical music from the same composer other classical performances of the same work.

When selecting a song in the web interface we would like to show the following information besides the standard information available in this page

Work: <Work>

The following information also related to this configuration is already available in the the song details in the web interface

Composer: <Composer>
Conductor: <Conductor>
Band: <Band>
Artist: <Artist>

The idea with this description is mainly to provide a bit more details regarding setup of Multi Library, Custom Scan and Custom Browse plugin and this configuration is just used as an example to show the possibilities. This example focus on how to setup the "Dynamic Tag" menu type.

Installation

To setup this you will have to install the following plugins

Note, the Multi Library plugin is only used to limit the new menus to classical music, if you like the new menu to show all kinds of music you don't need the Multi Library plugin. In this case you don't need to specify the "Library" parameters in the instructions below.

Tagging

All the information used in this example is not part of the standard tags for music files that exist, so the first requirement is that the information exist in tags in your music files.

If you like to follow this example exactly, it presumes that you have set your tags as follows

Standard tags

Tag Type of information Example values
ARTIST Name of solist or main artist Vladimir Horowitz, Yo-Yo Ma
ARTISTSORT Name of solist, artist, composer or conductor used when sorting elements Horowitz Vladimir, Ma Yo-Yo, Mozart Wolfgang Amadeus, Bach Johann Sebastian, Albinoni Tomaso Giovanni, Previn Andre
COMPOSER Name of composer Wolfgang Amadeus Mozart, Johann Sebastian Bach, Tomaso Giovanni Albinoni
CONDUCTOR Name of conductor Andre Previn, Seiji Ozawa, James Levine
BAND Name of ensemble New York Philharmonic, Vienna Philharmonic, London Symphony Orchestra
GENRE Name of genre Concerto, Symphony, Overture, Quintet, String Quartet, Piano Sonata

Non standard custom tags

Tag Type of information Example values
WORK Name of the work Piano Concerto No. 5, Piano Concerto No. 9, Piano Concerto No. 14
WORKSORT Name of the work used when sorting elements Piano Concerto No. 05, Piano Concerto No. 09,Piano Concerto No. 14

Scanning custom tags

The first thing to do is to make sure the custom tags are actually scanned into the SlimServer database. Before this we have of course used a taggning software to put the tags in our music files. We have stored the tag as a single value with a semicolon character separating the different values, for example like:

GENRE="Classical;Piano Sonata"

Custom Scan will use the standard MULTIPLE ITEMS IN TAGS setting found under Server Settings/Behavior for the separator character, so make sure this is set to the semicolon character or use the separator characters you have configured when setting the tags in the music files.

  1. Goto Custom Scan in the web interface
  2. Click the Custom Tag scanning module to change it settings as
    • Enable in automatic and full scans: Selected
    • Tags to scan: WORK,WORKSORT
    • Sort tag mapping: WORK=WORKSORT
  3. Click Save and then click the Scan link beside the Custom Tag scanning module

The custom tag information has now been scanned into the SlimServer database, it will still not be shown anywhere though. I'm not sure how the SlimServer standard tags will work with all file formats, incase the composers or conductors doesn't appear later on you might need to enter these also in Tags to scan.

Now, we also want to be able to freely combine information in standard SlimServer and the custom tags, to make this possible we also need to make sure the Mixed Tag scanning module is run:

  1. Goto Custom Scan in the web interface
  2. Click the Mixed Tag scanning module, change the parameters like:
    • Enable in automatic and full scans: Selected
    • Album tags: ALBUM
    • Artist tags: ARTIST
    • Composer tags: COMPOSER
    • Conductor tags: CONDUCTOR,ARTIST
    • Band tags: BAND,ARTIST
    • Genre tags: GENRE
    • Include custom tags: Selected
    • Names to show for user: ALBUM(Album:Albums),ARTIST(Artist:Artists),GENRE(Genre:Genres),YEAR(Year:Years),CONDUCTOR(Conductor:Conductors),COMPOSER(Composer:Composers),BAND(Band:Bands),TRACKARTIST(Track Artist:Track Artists),ALBUMARTIST(Album Artist:Album Artists),WORK(Work:Works)
  3. Click Save and then click the Scan link beside the Mixed Tag scanning module

Note!

Whenever you run the Custom Tag scanning module manually, you will also have to remember to run the Mixed Tag scanning module. When you use the Scan All links or just perform a SlimServer rescan this will happen automatically, but if you run a single scanning module, for example as described above, you will have to remember to run them both.

Creating library for classical music

To make it easier to differ between classical music and non classical music we need to start by creating a virtual library for the classical music.

Classical library

  1. Got Multi Library in the web interface
  2. Select Create new library and then select the library type Standard library
  3. Change library configuration parameters:
    • Library name: Classical Music
    • Include genres: Mark Classical
    • Included internal menus: Deselect all checkboxes
    • Show in home menu: Deselect for now
  4. Click Next and enter filename: classical.ml.values.xml
  5. Click Save to store the library

Non classical library

  1. Got Multi Library in the web interface
  2. Select Create new library and then select the library type Dependent library
  3. Change library configuration parameters:
    • Library name: Standard Music
    • Excluded contents of libraries: Select Classical Music
    • Included internal menus: Deselect all checkboxes
    • Show in home menu: Deselect for now
  4. Click Next and enter filename: standard.ml.values.xml
  5. Click Save to store the library

It doesn't really matter how you define your libraries, we have choose to identify classical music by a genre called Classical in this example, but you may want to identify it by a number of genres or by entering one of the directory parameters.

The only thing these library will do in this example is to make it easier to have different information in the song details menus and pages for classical and non classical music.

Creating browse menus

Now it's time to start creating the browse menu

  1. Goto Custom Browse in the web interface
  2. Select Settings and then Edit menus and finally Create new menu
  3. Select the menu type: Dynamic Tags
  4. Change menu parameters
    • Menu name: Classical Music
    • Limit to these tags: ALBUM,ARTIST,CONDUCTOR,COMPOSER,GENRE,WORK
    • Library: Classical Music
  5. Click Next and enter filename: classicalmusicdynamictags.cb.values.xml
  6. Click Save to store the changes

After this you should have a Classical Music menu under the Browse/Custom Browse menu which contains the new menu we have setup. This is the time to try out the menu and make sure it work correctly before you continue.

Move the browse menus

At the moment the Classical Music menu only exists inside the Custom Browse menu, we like this to be moved outside Custom Browse and into the standard Browse menu. To do this do as follows:

  1. Goto Custom Browse in the web interface
  2. Select Settings and then Enable/Disable menus/mixers
  3. Select the Show in browse and home menu column for our new "Classical Music" menu.
  4. Click Save to store the changes

The Classical Music menu should now be available directly in the standard Browse menu.

Configure Song Info web page

The next step will be to add Work to the Song Info page in the web interface.

  1. Goto Custom Browse in the web interface
  2. Select Settings and then Edit context menus/headers/footers and finally Create new menu
  3. Select the menu type: Custom Tags Songs for song
  4. Change the menu parameters:
    • Menu name: Work
    • Menu prefix: Work
    • Level 1 tag name: WORK
    • Library: Classical Music
    • Object type: trackheader
  5. Click Next and enter filename: trackheaderworks.cb.context.values.xml
  6. Click Save to store the changes

It is the Object type parameter that controls that the menus should be used for the Song Info page, so setting those to trackheader is really important.

The work should now be shown in the Song Info page in the web interface when showing a song. Note however, that it is only shown when selecting a song from one of the Custom Browse menus, we like to show it also when selecting a song from the current playlist, to accomplish this follow the next section.

Always use customized Song Info page

To make sure the customized Song Info page is used in all situations, we need to change the SlimServer skin to one of the skins provided with the Custom Browse plugin.

  1. Goto Server Settings in the web interface
  2. Select Interface section
  3. In the Web Interface parameter at the top select one of the skins that end with CB, currently DefaultCB and FishboneCB is available.
  4. Click Change to store the changes

The customized Song Info page will now be shown in all situations, the same is also for the customized album and artist pages that come with Custom Browse, which have a page header.

Configure Now Playing menu for classical music

It's now time to configure the menu shown when clicking the right arrow on the remote when standing on a song, for example in the Now Playing menu.

  1. Goto Custom Browse in the web interface
  2. Select Settings and then Edit context menus/headers/footers and finally Create new menu
  3. If using Custom Scan 1.18 or earlier, you will have to choose Download more menus because the Mixed Tag for song menu didn't make it to the 1.18 release
  4. Select the menu type: Dynamic Tags for song
  5. Change the menu parameters:
    • Menu name: Classical Music
    • Limit to these tags: ALBUM,ARTIST,COMPOSER,CONDUCTOR,GENRE,WORK
    • Library: Classical Music
    • Object type: track
  6. Click Next and enter filename: trackclassicalmusicdynamictags.cb.context.values.xml
  7. Click Save to store the changes

It is the Object type parameter that controls that the menus should be used for the Now Playing menu, so setting those to track is really important.

The configuration of the Now Playing menu is now finished. When the song details on a classical music song you should see our new "Classical Music" menu.